Skip to content

Enable assist to ignore lints by default #2487

Closed

Description

@bsutton

When I start working on a new code base one of the first things I tend to do is add the effective dart lints.
This typically yields thousands of errors.
A moderate no. of the lints are not valid.

It would be really convenient if the dart-code offered an 'add ignore' option quick fix for these lints.

Activity

  1. DanTup commented on May 25, 2020

    @DanTup
    Member

    This is supported, but you have to enable it with the following setting:

    "dart.showIgnoreQuickFixes": true,

    That should add additional quick-fix entries to ignore. Let me know if you have any issues with it!

  2. added
    awaiting infoRequires more information from the customer to progress
    on May 25, 2020
  3. bsutton commented on May 25, 2020

    @bsutton
    Author
  4. DanTup commented on May 26, 2020

    @DanTup
    Member

    The implementation of this is slightly hacky - it's done client-side and not in the language server, so it works by looking at errors in the current file and fabricates the assist, then just inserts a comment in the line above. It's possible for some code it might insert incorrectly.

    I tend to ship things like that off-by-default to get a little feedback usually from the person that originally asked for it, or my own use). There hasn't been much, but I've used it myself enough that I'm reasonable sure of it, so I'll look at switching it on by default in an upcoming version.

  5. changed the title [-]Offer option to 'ignore' lint[/-] [+]Enable assist to ignore lints by default[/+] on May 26, 2020
  6. added
    in editorRelates to code editing or language features
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    and removed
    awaiting infoRequires more information from the customer to progress
    on May 26, 2020
  7. modified the milestones: On Deck, v3.12.0 on May 26, 2020
  8. bsutton commented on May 26, 2020

    @bsutton
    Author

    I've used this a couple of times now and it seems to be working fine.

    I would be inclined to ship it on by default.
    Worst case it inserts it incorrectly and the user just has to ctrl-z to fix the issue.

  9. reopened this on May 27, 2020
  10. added a commit that references this issue on Jun 1, 2020
    4032071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions