Skip to content

Assists for linter rules #59868

@FMorschel

Description

@FMorschel

After some discussion over at #55985, we got to a decision to eventually move the fixes related to pubspec.yaml over to the server. I'm guessing the work for analysis_options.yaml would be similar if not the same. I'd like to request an assist for lint rules when we reach that point.

It would be good if we had an assist for the following (or cases where rules are incompatible/opposite) to swap between rules.

linter:
  rules:
    - prefer_single_quotes

Would show something like Swap this for 'prefer_double_quotes' or similar. I think this would be a good way of teaching people about opposite rules which they might not be familiar with and it would help people like me with a memory that doesn't seem to want to remember the rules' names and always need to look them up (sometimes I only remember the opposite rule and for setting up a new project this would be great).

This would go nicely with #57034.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixestype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions