presubmit 0.0.2

  • README.md
  • Installing
  • Versions
  • 46

presubmit

A batteries included package to validate whether the working revision of a Dart package conforms to testing and contribution requirements. Stated simply, "something to run on continuous integration before merging pull requests".

Usage

$ pub global activate presubmit

$ pub global run presubmit \
$   --[no]dartanalyzer \
$   --[no]dartfmt \
$   --[no]tests \
$   --path <location of package, defaults to current>

Planned work

A high-level list of work required to get this close to an initial release:

Running modes

  • [x] Allow running as a binary (i.e. pub run presubmit)
  • [x] Allow specifying binary arguments via the command-line
  • [ ] Allow specifying binary arguments via presubmit.yaml
  • [ ] Allow programmatic use, i.e. write your own tool/presubmit.dart

Built-in plugins

  • [x] Run the Dart analyzer and linter
  • [x] Run the Dart formatter
  • [x] Run the Dart test runner (pub run test)
  • [ ] Run an offline source generator (i.e. a build.dart file)

Extensibility

  • [ ] Allow defining your own plugin (unclear how this works yet)
  • [ ] Run nested sets of plugins (i.e. run program, run tests, close program)

1. Depend on it

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


dependencies:
  presubmit: "^0.0.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 packages get. Check the docs for your editor to learn more.

Version Uploaded Documentation Archive
0.0.2 Feb 25, 2017 Go to the documentation of presubmit 0.0.2 Download presubmit 0.0.2 archive
0.0.1 Jan 20, 2017 Go to the documentation of presubmit 0.0.1 Download presubmit 0.0.1 archive
0.0.0 Jan 20, 2017 Go to the documentation of presubmit 0.0.0 Download presubmit 0.0.0 archive

Analysis

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 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

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

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Suggestions

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

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

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0-dev.1.0 <2.0.0
args ^0.13.5 0.13.7 1.3.0
meta ^1.0.4 1.1.2
path ^1.4.0 1.5.1
Dev dependencies
test ^0.12.18