Skip to main content

Avoid non ascii symbols

Rule id

avoid-non-ascii-symbols

Severity

Warning

Description

Warns when a string literal contains non ascii characters. This might indicate that the string was not localized.

Example

Bad:

final chinese = 'hello 汉字'; // LINT
final russian = 'hello привет'; // LINT
final withSomeNonAsciiSymbols = '#!$_&- éè ;∞¥₤€'; // LINT
final misspelling = 'inform@tiv€'; // LINT

Good:

final english = 'hello';
final someGenericSymbols ='!@#$%^';