edilint / rule reference

charset / error

EL1004

charset.zero-width

Applies to: all

What it catches and why it matters

Zero-width or bidirectional formatting character that renders as nothing but occupies bytes.

Failing example

These synthetic fragments illustrate the defect; they are not complete interchange files. Backslash escapes name bytes such as \r (CR) and \n (LF).

An identifier reads ACME but contains AC\u200BME (a zero-width space).

How to fix it

Regenerate the identifier without the formatting character. Inspect the source bytes, since the character may be invisible in the editor.

False positives and limits

Bidirectional formatting can be intentional in free text. Check the field's purpose and receiver support before removing it; an identifier should be reviewed separately from prose.

Acknowledgments and suppression

No direct acknowledgment code is mapped for this rule.
Suppress the rule with --disable EL1004, or list it under "disable" in .edilint.yml. To accept the occurrences a file already has without suppressing the rule, record them with --write-baseline and run with --baseline.
Reference: https://crb2nu.github.io/edilint/rules/EL1004.html

All rules · Configuration