-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Lint configuration source annotations #57193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What functionality should it provide?
If annotations are used I guess dart2js and the VM need to be modified to ignore these annotations I would prefer a less verbose form than
|
For reference, the issue tracking a request to add language support for a proper annotation is here: https://code.google.com/p/dart/issues/detail?id=12490. |
@zoechi : all things being equal, I totally agree. Those verbose comments make me uneasy. Without thinking about it too hard, I wish we could do something as simple as:
or, if we need to qualify by group:
I'm with you on scoping. Failing an annotation proper, I'd like our support to emulate one and allow for addressing classes, members, statements, etc. |
With groups I would prefer
|
@lukechurch : care to comment? |
@zoechi : I'm with you and strongly leaning towards the simplest proposal:
or in case it needs qualifying:
|
@pq What would you like for the end of an arbitrary block (in case this will be supported)?
|
Closing. Suppressing lints is supported by the analyzer proper: https://www.dartlang.org/guides/language/analysis-options#excluding-lines-within-a-file |
Ideally, disabling lints will piggyback on a general method to disable warnings via source annotations in the analyzer. Pending resolution there, and perhaps to encourage it, this ticket is meant to kick off the conversation specific to disabling linting (but really about configuring the analyzer in general).
By way of a motivational example, take the following.
which triggers a lint suggesting we should prefer a public final field to a
getter
in this instance. Suppose, just this once, we'd like to suppress that warning. How would that look?Some prior art to get the juices flowing.
eslint
jscs
jshint
pylint
RubyCop:
stylecop
tslint
The text was updated successfully, but these errors were encountered: