sdk
sdk copied to clipboard
[analysis_server] provide a fix to disable a lint rule in `analysis_options.yaml`
Description
Provide a fix to disable a lint rule in analysis_options.yaml that is similar to ignore diagnostic fixes. The ignore diagnostic fixes can either ignore a line or an entire file by adding a comment above the line to be ignored or the top of the file for the entire file to be ignored (e.g. // ignore: public_member_api_docs for a line).
A fix to disable a specific lint rule would instead disable the lint rule in the analysis_options.yaml file such as:
include: package:very_good_analysis/analysis_options.3.0.1.yaml
analyzer:
exclude:
- build/**
linter:
rules:
public_member_api_docs: false # <~~~~~~~ add here by the quick fix
Additional Context This feature request is necessary for an downstream feature request in the VS Code extension repo which can be found here: https://github.com/Dart-Code/Dart-Code/issues/4079