dependency_validator
dependency_validator copied to clipboard
Support dependency_validator running on analysis_options.yaml files
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