| commit | 431e8120eb3e1df491d7b361661fca0ff16bd7e1 | [log] [tgz] |
|---|---|---|
| author | Phil Quitslund <pq@users.noreply.github.com> | Thu Feb 12 13:50:05 2015 -0800 |
| committer | Phil Quitslund <pq@users.noreply.github.com> | Thu Feb 12 13:50:05 2015 -0800 |
| tree | 49d74afce81266e303aebc1921e7441d535760bd | |
| parent | f5f6a284e1876fbc7c064265a78b5ff2238c9f32 [diff] |
Update README.md
A Dart style linter.
Clone the linter repo like this:
git clone https://github.com/dart-lang/linter.git
When the source is more mature, we’ll push regular builds to pub.
The 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.
Since we are currently in such active development, running from source is the best way to try dart_lint out.
Running it looks like this:
dart path_to_lint_clone/bin/lint.dart my_library.dart
With example output looking like this:
Linting /Users/acme/dart/my_library/lib/my_library.dart... [lint] PREFER using a public final field instead of a private field with a public getter. (/Users/acme/dart/my_library/lib/my_library.dart, line 4, col 3) 1 lint found.
Supported options are
-h, --help Shows usage information.
--dart-sdk Custom path to a Dart SDK.
-p, --package-root Custom package root. (Discouraged.) Remove to use package information computed by pub.
Note that you should not need to specify an sdk or package-root. Other configuration options are on the way.
Feedback is, of course, greatly appreciated and contributions are welcome! Please read the contribution guidelines.
Please file feature requests and bugs at the issue tracker.