-
Notifications
You must be signed in to change notification settings - Fork 43
Consider using pedantic as a baseline for linting? #459
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
fyi @davidmorgan |
We had similar discussion a few months back, and I agree with @mit-mit's comment here: "If we think this flag is high value, why is it not on by default [in dartanalyzer]?" Copying and applying Flutter's defaults is fine, we also try to match stagehand's defaults, but other than that, these lints are optional, and we should treat them as such. If they provide better code quality, then their place is in |
I guess that raises the question then of why lint at all. FWIW I don't think the rules provided as an example in the stagehand template were very thoughtfully considered (and needless to say I'm certain they are not being actively maintained or reviewed). As for @mit-mit's comment, I think analyzer flags are a little different than lints but I totally agree with the sentiment. Many lints are lints (and not hints / warnings) for mainly historical reasons. Someday we may get around to rationalizing what is where but that's a conversation that's started and ultimately stalled at least a few times in the last 5 years (@bwilkerson: or more?). As another thought, what if being pedantic clean earned you extra credit in scoring? 😉 |
Ok, whoops. I should have looked before I spoke. https://github.com/dart-lang/stagehand/blob/master/analysis_options.yaml is actually pretty fleshed out thanks to recent changes from @kevmoo. Notably, it is a superset of pedantic... As it's pretty opinionated, I'm not sure we want this as a standard for scoring or not? |
I meant the ones that are created by default in the simple project template: The goal is that if a developer follows the recommended tool's defaults, we should gave it the max score. |
Ah, right. Good point. In that case my original thought is actually little more relevant. The rules in that template haven't been changed for over a year.
Regarding this, if Thanks for the back and forth! |
I like the idea of a vanity badge :) |
Cycling back to this, as of dart-archive/stagehand#594, stagehand is now using Can we update |
We haven't quite updated stagehand yet... I'll prepare a release so we can publish it. |
Sure, we shall follow that. |
The stagehand release is prepped, but I'd like to update the analysis options docs before I publish stagehand. dart-lang/site-www#1322 |
And the doc change is finally out! I've published stagehand. |
Uh oh!
There was an error while loading. Please reload this page.
Currently there's a hand-crafted list of enforced lints:
https://github.com/dart-lang/pana/blob/master/lib/src/analysis_options.dart
It would be cool to migrate to the pedantic package rule-set and be able to badge projects "pedantic" clean or something.
FWIW we're tagging pedantic and flutter user lints now in the generated docs like so:
(The flutter badge corresponds to lints in flutter user options.)
/cc @isoos @kevmoo @jonasfj
The text was updated successfully, but these errors were encountered: