2 Checks for usage of unicode scripts other than those explicitly allowed
5 This lint doesn't take into account non-text scripts such as `Unknown` and `Linear_A`.
6 It also ignores the `Common` script type.
7 While configuring, be sure to use official script name [aliases] from
8 [the list of supported scripts][supported_scripts].
10 See also: [`non_ascii_idents`].
12 [aliases]: http://www.unicode.org/reports/tr24/tr24-31.html#Script_Value_Aliases
13 [supported_scripts]: https://www.unicode.org/iso15924/iso15924-codes.html
16 It may be not desired to have many different scripts for
17 identifiers in the codebase.
19 Note that if you only want to allow plain English, you might want to use
20 built-in [`non_ascii_idents`] lint instead.
22 [`non_ascii_idents`]: https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#non-ascii-idents
26 // Assuming that `clippy.toml` contains the following line:
27 // allowed-locales = ["Latin", "Cyrillic"]
28 let counter = 10; // OK, latin is allowed.
29 let счётчик = 10; // OK, cyrillic is allowed.
30 let zähler = 10; // OK, it's still latin.
31 let カウンタ = 10; // Will spawn the lint.