address requested changes
This commit is contained in:
parent
f3682a1304
commit
3a07333a8a
7 changed files with 18 additions and 13 deletions
|
@ -190,15 +190,16 @@ impl EarlyLintPass for NonAsciiIdents {
|
|||
if check_uncommon_codepoints
|
||||
&& !symbol_str.chars().all(GeneralSecurityProfile::identifier_allowed)
|
||||
{
|
||||
let codepoints: Vec<_> = symbol_str
|
||||
.chars()
|
||||
.filter(|c| !GeneralSecurityProfile::identifier_allowed(*c))
|
||||
.collect();
|
||||
let codepoints_len = codepoints.len();
|
||||
|
||||
cx.emit_span_lint(
|
||||
UNCOMMON_CODEPOINTS,
|
||||
sp,
|
||||
IdentifierUncommonCodepoints {
|
||||
codepoints: symbol_str
|
||||
.chars()
|
||||
.filter(|c| !GeneralSecurityProfile::identifier_allowed(*c))
|
||||
.collect(),
|
||||
},
|
||||
IdentifierUncommonCodepoints { codepoints, codepoints_len },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue