@Vadim Petrochenkov I want to have a try implementing the
uncommon_codepoints lint. But I'm not sure where is the appropriate position to implement this checking. I think implementing it on lexer will cause a lot of repetitive checking, and want to avoid it if possible.
I think implementing it on lexer will cause a lot of repetitive checking
Why? Lexer doesn't do its work repeatedly.
Lexer (or proc macro server) creates a token once, then it can be cloned, passed, etc. without any lexer participation.
I thought this will cause repetitive checking on different usages of the same identifier? Or should i cache the
Symbol value somehow?
I searched around and didn't find any lint-related code around in the lexer... Am i the first one adding a lint there? What should i do to make use of the lint infrastructure described in https://rust-lang.github.io/rustc-guide/diagnostics.html#lints ?
Maybe i should insert my implementation into https://github.com/rust-lang/rust/blob/master/src/librustc_lint/non_ascii_idents.rs ? Seems much easier...
I started looking at this a couple of weeks back, I can help you with the implementation