Setting up SonarQube on Your Local Machine for NodeJS Projects

A step by step guide with an example project

Bhargav Bachina
Bachina Labs

--

Code Quality is one of the most important aspects of software engineering. SonaQube is the code assurance tool that ensures the code quality of the project by collecting your source code and analyzing it. You can configure your CI/CD pipeline to deploy or not based on the results from this tool. For example, if the unit test coverage is less than 85% you can fail the build pipeline.

In this post, we will see how we can run the static analysis for your project on your local machine. This will be useful to make sure your code quality is good before you check in your changes or make a PR, etc.

  • Prerequisites
  • Example Project
  • Installing SonarQube
  • Running Analysis
  • Summary
  • Conclusion

Prerequisites

There are some prerequisites for this post. You need to have a NodeJS installed on your machine and some other tools that are required to complete this project.

--

--