Coder Social home page Coder Social logo

christofferqa / linter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dart-lang/linter

0.0 2.0 0.0 398 KB

Style linter for Dart.

Home Page: http://dart-lang.github.io/linter/

License: BSD 3-Clause "New" or "Revised" License

Dart 99.58% Shell 0.42%

linter's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.