Setting up SonarQube on Your Local Machine for Python 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

Python is one of the fastest-growing programming languages nowadays and is used for machine learning, data science, and a lot of other use cases. The best way to start learning python is by practicing it on your machine.

We need to install python on your machine first. Once installed, you can run the python code on your…

--

--