dependency_validator 1.1.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 85

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-missing flag.
  • 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-promoted flag.
  • 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-promoted flag.
  • 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-unused flag.
    • 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
    

1.0.1

  • 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

1.0.0

  • Initial version!

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate dependency_validator

2. Use it

The package has the following executables:


$ dependency_validator

Use this package as a library

1. Depend on it

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


dependencies:
  dependency_validator: "^1.1.2"

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 flutter 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.1.2 Apr 9, 2018 Go to the documentation of dependency_validator 1.1.2 Download dependency_validator 1.1.2 archive
1.1.1 Feb 28, 2018 Go to the documentation of dependency_validator 1.1.1 Download dependency_validator 1.1.1 archive
1.1.0 Feb 27, 2018 Go to the documentation of dependency_validator 1.1.0 Download dependency_validator 1.1.0 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

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
70 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
85
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

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

Suggestions

  • 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.

Dependencies

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