Closed
Description
Playground link: https://play.rust-lang.org/?gist=054aaeb143021ea121fc0c091903697b&version=nightly
It currently prints:
warning: static variable `hello` should have an upper case name such as `HELLO`
--> src/main.rs:3:1
|
3 | static hello: &str = "Hello";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(non_upper_case_globals)] on by default
warning: constant `world` should have an upper case name such as `WORLD`
--> src/main.rs:4:1
|
4 | const world: &str = ", world!";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It would be nicer if it only underlines the variable name itself:
warning: static variable `hello` should have an upper case name such as `HELLO`
--> src/main.rs:3:1
|
3 | static hello: &str = "Hello";
| ^^^^^
|
= note: #[warn(non_upper_case_globals)] on by default
warning: constant `world` should have an upper case name such as `WORLD`
--> src/main.rs:4:1
|
4 | const world: &str = ", world!";
| ^^^^^
I have some basic lint writing experience through clippy, so I would like to give this a go.