CPLAT-11572: Add a mechanism to enable/disable diagnostics in analysis_options.yaml
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 432
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
CPLAT-11572
We can read from analysis_options.yaml via contextRoot.optionsFile (available in createAnalysisDriver) and use that to load config specific to our plugin.
We probably won't be able to reuse the section for lints without causing analysis errors in analysis_options.yaml, so we'll probably need our own section.
We could potentially reuse the way lint rules are parsed: https://github.com/dart-lang/sdk/blob/364dd8936b73f48cf981b053383a72f730852cdc/pkg/analyzer/lib/src/lint/config.dart#L118
Semi-related: analyzer plugin errors can't be ignored globally via analyzer.errors: https://github.com/dart-lang/sdk/issues/41531
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at createAnalysisDriver and inspect contextRoot.optionsFile to understand how analysis_options.yaml is loaded. Compare the referenced analyzer lint configuration parser, then define and implement a separate configuration section for enabling or disabling plugin diagnostics; done means the configuration is read without causing analysis errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100