wist
wist copied to clipboard
Allow an inline code way to override rules
Something like a comment-based format to override rules.
Maybe ' bslint "rule-name": "severity"
As an example to turn off the rule no-print
you would add the following comment:
' bslint "no-print": "off"
We could also go all in ESLint style and have a few different types of statements, such as ' bslint-disable
, ' bslint-enable
, ' bslint-disable-next-line
, ' bslint-disable-line
.
I really like this 👍
A new proposal that surfaced recently was to use conditional compilation constants as annotations for scoped blocks. For example
#const __suppress_wist_rule_name = true
function breakRuleHere() as Void
...
end function
#const __suppress_wist_rule_name = true
function anotherFunction() as Void
...
end function
It could also be possible use them as fenced blocks to enable and disable rules.
#const __suppress_wist_rule_name = false
function breakRuleHere() as Void
...
end function
#const __suppress_wist_rule_name = true