Giter Club home page Giter Club logo

sonar's Introduction

sonar

Build Status Build status Greenkeeper badge Gitter

Quick start user guide

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

Using npx

Just run the following command:

npx @sonarwhal/sonar https://example.com

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

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

Installing sonar globally

npm install -g --engine-strict @sonarwhal/sonar

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

sonar --init

Scan a website:

sonar https://example.com

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.

Quick start contributor guide

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

The following are meant only if you are working on sonar's codebase:

  • npm run site <url> will analyze the website with the current configuration and using the latest build available in the dist directory.
  • npm run site -- --debug <url> same as above, but will show all the debug information.
  • npm run lint will lint the code.
  • npm run watch will start watchmode. This is the recommended task to run in the background while developing. It does the following:
    • sync all the resources from src to dist (basically anything that is not a .ts file).
    • compile the typescript files incrementally to dist.
    • run all the tests incrementally.
  • npm run build will do the same as the watch task but only once and without running the tests.
  • npm test will run the tests with code coverage using the code available in dist. It is better to run this task after build.

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.

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.

sonar's People

Contributors

alrra avatar molant avatar greenkeeper[bot] avatar sarvaje avatar qzhou1607-zz avatar qczhou avatar austinkelleher avatar ststimac avatar kborchers avatar dhritzkiv avatar t-sauer avatar aarongustafson avatar alexdangelo avatar no23reason avatar kjswalls avatar melanierichards avatar rachelnabors avatar cfjedimaster avatar thangchung avatar tkadlec avatar

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.