Skip to content

Support ignoring lint(s) for a part of the file #60013

@Albert221

Description

@Albert221

I'd like to propose adding a lint rule ignore for a region of a file. We currently have ignore and ignore_for_file comments supported. What I'm proposing is maybe something like ignore_start and ignore_end. Other languages have a feature like this:

  • C# - #pragma warning disable CA2200 and #pragma warning restore CA2200
  • JSLint - /*jslint-disable*/ and /*jslint-enable*/
  • Possibly other languages

Dart formatter has something similar for selectively disabling formatting for a fragment of file with // dart format off and // dart format on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagetype-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