Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Allow an inline code way to override rules #13

Open
vannuysm opened this issue Sep 7, 2017 · 3 comments
Open

Allow an inline code way to override rules #13

vannuysm opened this issue Sep 7, 2017 · 3 comments
Labels
enhancement request for comments Proposal open for comments and ideas
Milestone

Comments

@vannuysm
Copy link
Contributor

vannuysm commented Sep 7, 2017

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"

@vannuysm
Copy link
Contributor Author

vannuysm commented Sep 7, 2017

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.

@vannuysm vannuysm modified the milestone: future Sep 8, 2017
@slheavner
Copy link
Contributor

I really like this 👍

@nishtahir
Copy link
Member

nishtahir commented Mar 15, 2018

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

@nishtahir nishtahir added request for comments Proposal open for comments and ideas and removed help wanted labels May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement request for comments Proposal open for comments and ideas
Projects
None yet
Development

No branches or pull requests

3 participants