dependency_validator 1.3.0
dependency_validator: ^1.3.0 copied to clipboard
Checks for missing, under-promoted, over-promoted, and unused dependencies.
Dependency Validator #
A tool to help you find missing, under-promoted, over-promoted, and unused dependencies.
Getting Started #
Install dependency_validator #
Add the following to your pubspec.yaml:
dev_dependencies:
dependency_validator: ^1.0.0
Usage #
This package comes with a single executable: dependency_validator. To run this executable: pub run dependency_validator. This usage will run the tool and report any missing, under-promoted, over-promoted, and unused dependencies.
- Missing: When a dependency is used in the package but not declared in the
pubspec.yaml- Optionaly do not fail by using the
--no-fatal-missingflag.
- Optionaly do not fail by using the
- Under-promoted: When a dependency is used within
lib/but only declared as a dev_dependency.- Optionaly do not fail by using the
--no-fatal-under-promotedflag.
- Optionaly do not fail by using the
- Over-promoted: When a dependency is only used outside
lib/but declared as a dependency.- Optionaly do not fail by using the
--no-fatal-over-promotedflag.
- Optionaly do not fail by using the
- Unused: When a dependency is not used in the package but declared in the
pubspec.yaml.- Optionaly do not fail by using the
--no-fatal-unusedflag. - Some packages are not imported by any dart files but are used for their executables. If that is the case they can be white-listed by using the
--ignoreoption.
dependency_validator --ignore coverage,dartdoc - Optionaly do not fail by using the
- Common binary packages: By default, common packages used solely for their
binaries, such as
build_runneranddart_style, are automatically ignored. For the current set of whitelisted binary packages, refer to the help:dependency_validator -h.- Optionally do not ignore common binary packages using the
--no-ignore-common-binariesflag.
- Optionally do not ignore common binary packages using the