SonarQube (formerly Sonar) is an open-source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs and code smells in 29 programming languages. SonarQube offers reports on duplicated code, coding standards, unit tests, code coverage, code complexity, comments, bugs, and security recommendations.
SonarQube can record metrics history and provide evolution graphs. SonarQube provides fully automated analysis and integration with Maven, Ant, Gradle, MSBuild, and continuous integration tools (Atlassian Bamboo, Jenkins, Hudson, etc.)
SonarQube doesn’t own a plugin for analyzing Dart language and Flutter test reports. So we require a custom-made plugin added to SonarQube extensions.
This blog may help you implement sonarqube in your Flutter app.
Setup for Mac
Note: The SonarQube server requires Java version 11 and the SonarQube scanners require Java version 11 or 17.
Download and Setting up Sonarqube
- Go to the Link → https://www.sonarqube.org/downloads/
2. Click COMMUNITY to download as a zip file
3. Extract a zip file and Move it into the Applications folder
4. Change the name of the folder to SonarQube
Download and Setting up SonarScanner
- Go to the Link → https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/
- Click and download sonar scanner depending on your system OS
3. Download SonarScanner Mac OS X 64-bit as a zip file
4. Extract a zip file and move it into the applications folder