D-Scanner
D-Scanner copied to clipboard
Skip lint on given line / function / class ..
Would you be open to add some mechanism to skip linting a given line / function / ... ?
For example through UDAs, following code wouldn't raise any warning.
@("NOLINT(useless_initializer)")
bool b = false;
I can work on a POC if you're ok with the concept
awesome! Yes this would be very much appreciated. Also it would be great if this worked both with @("nolint(...)")
as well as @nolint("...")
(for future compatibility or big projects that declare this)
We had the idea before that dub packages could provide files that are always implicitly imported by the compiler, such as object
is already, which could provide exactly UDA definitions like this and help the compiler statically check for wrongly used attributes. However these UDA files will still need compiler flag support, which wasn't merged yet / didn't have a compelling use-case yet.