Skip to content

Fix ZWNJ literal in fa_ir NOT_ALPHA message (staticcheck ST1018) - #235

Merged
cinar merged 1 commit into
mainfrom
fix-fa-ir-zwnj-staticcheck
Sep 5, 2026
Merged

Fix ZWNJ literal in fa_ir NOT_ALPHA message (staticcheck ST1018)#235
cinar merged 1 commit into
mainfrom
fix-fa-ir-zwnj-staticcheck

Conversation

@cinar

@cinar cinar commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Problem

main is currently red: the build CI job fails on staticcheck:

locales/fa_ir.go:11:25: string literal contains the Unicode format character U+200C, consider using the '‌' escape sequence instead (ST1018)

Introduced in #231 (alpha/numeric checkers) — the fa-IR translation for NOT_ALPHA had a raw zero-width non-joiner character embedded directly in the string literal instead of the escaped form every other ZWNJ in this file already uses (see #178, which fixed this exact class of issue previously).

Fix

Replace the raw U+200C with the \u200c escape sequence, matching the existing convention in the same file.

Verification

Local staticcheck can't run in this environment (Go toolchain version mismatch unrelated to this change), so verified with a Unicode-category scan across every .go file in the repo for any Cf (format) character — confirms this was the only occurrence.

  • go build, go vet, go test -race (100% coverage), gosec, revive all clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FLdVmP5daHiknrTW4Geh2i

staticcheck ST1018 flags a raw U+200C (zero-width non-joiner)
character in a string literal; use the backslash-u-200c escape
sequence instead, same as every other ZWNJ already in this file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FLdVmP5daHiknrTW4Geh2i
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (db36d1b) to head (c186cc3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #235   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           58        60    +2     
  Lines         1087      1106   +19     
=========================================
+ Hits          1087      1106   +19     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cinar
cinar merged commit b8bd5ac into main Sep 5, 2026
8 checks passed
@cinar
cinar deleted the fix-fa-ir-zwnj-staticcheck branch September 5, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant