SonarQube: QA management tool
Category: /knowledge /developmentTags: development
SonarQube (previous called Sonar) is an open source code quality management plat form. SonarQube supports more than 20 programming languages including Java. It internally uses Checkstyle & PMD for code quality; we can add more custom rules as required.
Features
- Architecture & Design
- Duplications
- UnitTests
- Complexisty
- Potential Bugs
- Coding Rules
- Comments
Getting started
- download and unzip sonarQube
- start the server
- verify in console
- open URL as http://localhost:9000
Analyze the code in 2 ways.
- Using Sonar Runner
- Using Ant script
- setup Apache ant in your local env
- setup required env vars like $PATH, $ANT_HOME, $JAVA_HOME
- download
sonar-ant-task-2.1.jar
and place it in apache-ant-$ver/lib - write an ant script that does the analysis
- place the above XML in your code base root
- go to command and navigate to the code base and run ant with above file as input
ant -f build.xml