Workiva / Workiva/over_react

CPLAT-11572: Add a mechanism to enable/disable diagnostics in analysis_options.yaml

Open
#568 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-analyzer-plugin
Dominant language
Dart
Stars
432
Forks
57
PR merge metrics
No merged PRs in 30d

Description

CPLAT-11572

Issue Status

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.