Workiva / Workiva/dependency_validator

Support dependency_validator running on analysis_options.yaml files

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

Nobody has claimed this yet.

Dominant language
Dart
Stars
66
Forks
26
Avg merge
5d 7h
Merged PRs (30d)
7

Description

It is possible, and common practice to add a include: package:<somePackage>/<someEntrypoint>.yaml within an analysis_options.yaml file

For example, this is how pedantic and the newer lints package work

include: package:lints/recommended.yaml

Currently, dependency validator completely ignores this file, but it could, and probably should, audit the dependencies used within these files

I'm proposing the following rules regarding this file:

  • if a dependency is used within the analysis_options.yaml include statement and is not declared within the pubspec.yaml file, the command should fail
  • if a dependency is only used within the analysis_options.yaml include AND is declared as a non-dev dependency, the command should fail

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 by tracing how dependency_validator reads pubspec.yaml and identifies dependency usage, then locate where analysis_options.yaml files are excluded. Use the include entry in analysis_options.yaml and the dependency declarations in pubspec.yaml as the verification cases. Done means undeclared includes fail validation and dependencies used only by the include are required to be dev dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.