dependency_validator 1.0.1

  • Installing
  • Versions
  • 80

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:

  dependency_validator: ^1.0.0


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
  • Under-promoted: When a dependency is used within lib/ but only declared as a dev_dependency.
  • Over-promoted: When a dependency is only used outside lib/ but declared as a dependency.
  • Unused: When a dependency is not used in the package but declared in the pubspec.yaml.
    • 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 --ignore option.
    dependency_validator --ignore coverage,dartdoc


  • Bug Fix: Packages ignored via the --ignore option will no longer be reported at all (previously they were only being ignored in the "unused" list). #10 #12


  • Initial version!

1. Depend on it

Add this to your package's pubspec.yaml file:

  dependency_validator: "^1.0.1"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:dependency_validator/dependency_validator.dart';
Version Uploaded Documentation Archive
1.0.1 Feb 9, 2018 Go to the documentation of dependency_validator 1.0.1 Download dependency_validator 1.0.1 archive
1.0.0 Nov 17, 2017 Go to the documentation of dependency_validator 1.0.0 Download dependency_validator 1.0.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 9, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
60 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, other

Primary library: package:dependency_validator/dependency_validator.dart with components: io.


  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use dependency_validator.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.2 <2.0.0
args ^0.13.7 0.13.7 1.3.0
logging ^0.11.3+1 0.11.3+1
yaml ^2.1.13 2.1.13
Transitive dependencies
charcode 1.1.1
collection 1.14.5
path 1.5.1
source_span 1.4.0
string_scanner 1.0.2
Dev dependencies
coverage ^0.9.3
dart_dev ^1.8.0
dart_style ^1.0.8
dartdoc ^0.14.1
test ^0.12.24+8