Once you have
v8.x on your machine, you can use
npx or install
to use it.
Just run the following command:
npx sonarwhal https://example.com
This will start the wizard to create a
.sonarwhalrc file, and then
Windows users: Currently
npx has an issue in this
npm install -g --engine-strict sonarwhal
.sonarwhalrc file by running this command and following the
Scan a website:
The following are meant only if you are working on
npm run site <url>will analyze the website with the current configuration and using the latest build available in the
npm run site -- --debug <url>same as above, but will show all the debug information.
npm run lintwill lint the code.
npm run watchwill start watchmode. This is the recommended task to run in the background while developing. It does the following:
dist(basically anything that is not a
npm run buildwill do the same as the
watchtask but only once and without running the tests.
npm testwill run the tests with code coverage using the code available in
dist. It is better to run this task after
The initialization of the
watch task is a bit especial: it will
compile and copy the assets before starting to watch for new files
to copy, build, or test. Because of concurrency, it might be that
the tests are run twice initially.
This project adheres to the JS Foundation’s code of conduct. By participating in this project you agree to abide by its terms.
The code is available under the Apache 2.0 license.