presubmit 0.0.2

  • README.md
  • Installing
  • Versions
  • 39

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)

Use this package as a library

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 flutter 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

We analyzed this package on Jun 23, 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]
0 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
49 / 100
Overall score:
Weighted score of the above. [more]
39
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Suggestions

  • Running dartdoc failed.

    Make sure dartdoc runs without any issues.

  • Maintain CHANGELOG.md.

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

  • Package is getting outdated.

    The package was released 68 weeks ago.

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

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 hints.

    Strong-mode analysis of lib/src/plugins/analyzer.dart gave the following hint:

    line: 77 col: 52
    'UTF8' is deprecated and shouldn't be used.

    Strong-mode analysis of lib/src/plugins/dartfmt.dart gave the following hint:

    line: 40 col: 62
    'UTF8' is deprecated and shouldn't be used.

    Similar analysis of the following files failed:

    • lib/src/plugins/test.dart (hint)
  • 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.4.3
meta ^1.0.4 1.1.5
path ^1.4.0 1.6.1
Dev dependencies
test ^0.12.18