/sonarwhal

A linting tool for the web

Primary LanguageTypeScriptApache License 2.0Apache-2.0

sonarwhal

sonarwhal logo Travis CI Build Status AppVeyor Build Status Gitter

Quick start user guide

Once you have Node.js v8.x on your machine, you can use npx or install sonarwhal globally to use it.

Using npx

Run the following command:

npx sonarwhal https://example.com

This will start the wizard to create a .sonarwhalrc file, and then analyze https://example.com.

Windows users: Currently npx has an issue in this platform.

Installing sonarwhal globally

npm install -g --engine-strict sonarwhal

Create a .sonarwhalrc file by running this command and following the instructions:

sonarwhal --init

Scan a website:

sonarwhal https://example.com

To use a different formatter than the one specified in your .sonarwhalrc file you can do the following:

sonarwhal https://example.com --formatters excel

To use a different rule than the one specified in your .sonarwhalrc file:

sonarwhal https://example.com --rules html-checker

Multiple rules can be specified as a comma sepreated string:

sonarwhal https://example.com --rules axe,html-checker

For more in depth information on how to get started, configurations, and more, see the online user guide, or the local version for the most recent (and unstable) content.

Contributing to sonarwhal

To know more about the internals of sonarwhal, the structure of the project, how to create new rules, collectors, formatters, etc, take a look at the online contributor guide (or the local version).

Code of Conduct

This project adheres to the JS Foundation’s code of conduct. By participating in this project you agree to abide by its terms.

License

The code is available under the Apache 2.0 license.