Publish linter `0.1.24`.

* Internal updates to keep up with changes in the analyzer package.
* Updated `close_sinks` to respect calls to `destroy` (#282).
* Fixed `only_throw_errors` to report on the expression not node.

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org//2245123002 .
2 files changed
tree: 1808908f9d13a5f2cd9afe08641bf406e301562a
  1. bin/
  2. doc/
  3. example/
  4. lib/
  5. test/
  6. tool/
  7. .analysis_options
  8. .gitignore
  9. .travis.yml
  10. appveyor.yml
  11. AUTHORS
  12. CHANGELOG.md
  13. codereview.settings
  14. CONTRIBUTING.md
  15. LICENSE
  16. pubspec.yaml
  17. README.md
README.md

Linter for Dart

A Dart style linter.

Build Status Build status Coverage Status Pub

Installing

The easiest way to install the linter is to globally activate it via pub:

$ pub global activate linter

Alternatively, clone the linter repo like this:

$ git clone https://github.com/dart-lang/linter.git

Usage

Linter for Dart gives you feedback to help you keep your code in line with the published Dart Style Guide. Currently enforced lint rules (or “lints”) are catalogued here. When you run the linter all lints are enabled but don't worry, configuration, wherein you can specifically enable/disable lints, is in the works. While initial focus is on style lints, other lints that catch common programming errors are certainly of interest. If you have ideas, please file a feature request.

Running the linter via pub looks like this:

$ pub global run linter my_project

With example output will looking like this:

my_project/my_library.dart 13:8 [lint] Name non-constant identifiers using lowerCamelCase.
  IOSink std_err = stderr;
         ^^^^^^^
12 files analyzed, 1 issue found.

Supported options are

-h, --help                             Shows usage information.
-s, --stats                            Show lint statistics.
    --[no-]visit-transitive-closure    Visit the transitive closure of imported/exported libraries.
-q, --[no-]quiet                       Don't show individual lint errors.
-c, --config                           Use configuration from this file.
    --dart-sdk                         Custom path to a Dart SDK.
-p, --package-root                     Custom package root. (Discouraged.)

Note that you should not need to specify an sdk or package-root. Lint configuration file format is provisional and under active discussion. Other configuration options are on the way.

Contributing

Feedback is, of course, greatly appreciated and contributions are welcome! Please read the contribution guidelines.

Features and bugs

Please file feature requests and bugs at the issue tracker.