-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Consider migrating categories to tags #57719
Comments
I like those. I also like, STYLE, PERFORMANCE, ERROR-PRONE, CODE BLOAT |
👍 @srawlins qq: ERROR-PRONE -- do you mean the lint is prone to error? (e.g., false positives?) |
No, I mean like "Code that violates this lint is error-prone", like |
I see now that the "categories" are actually
sdk/pkg/analyzer/lib/src/lint/linter.dart Lines 255 to 261 in 77202bf
Strange. Having multiple groups per rule will break this notion. |
Yeah. This wasn't entirely by design. The group stuff got pulled into analyzer in a bulk move to ease maintenance. It's probably not the best place for it to be if we're going to be changing it. As for |
@jcollins-g just gave (well, is giving 😛) a demo of category support for |
Hi @pq the category/tag concept doesn't seem very complex. Right now the Group class in analyzer is super small. What complexity would we avoid duplicating? In particular the Category and Categorization classes (from dartdoc's model.dart) I think have a lot of complexity that would make this harder to integrate than to just adjust the Group class. |
Thanks for cycling back to this @srawlins! I'm going to pack-peddle (bad pun, ha) and say we should just do our own thing. Onward! ⚡️ 🚲 ⚡️ |
Excellent! Not high priority, but I'll change gears (🚲) after a few other items and look into this. |
Spelled out at https://github.com/dart-lang/linter/issues/1020 Fixes https://github.com/dart-lang/linter/issues/1020 This CL does not change the categories/groups that any rule has. We can add/change categories in later CLs. Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try Change-Id: Ief2856a6c472492bbad19fc95df172ef8d19fe7b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369861 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com> Commit-Queue: Sam Rawlins <srawlins@google.com>
Fixed with 6c6b104 |
Lints no longer are part of three specific groups, but now have tags/groups (https://github.com/dart-lang/linter/issues/1020). This PR removes the expectation of the three groups so that the lints keep rendering. It also updates the source data to the latest version with no groups. As part of the work in #4499, we'll surface the new categories/tags later on :) Closes dart-lang/sdk#56396
In the current incarnation, lints can belong to a single category but moving forward it would be interesting to consider a tag approach. A few ideas for tags that come to mind:
But I'm just spit-balling!
/cc @srawlins
The text was updated successfully, but these errors were encountered: