SonarQube with Flutter

Ricardo Castellanos
4 min readAug 30, 2023

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 includes support for the programming languages Java (including Android), C#, C, C++, JavaScript, TypeScript, Python, Go, Swift, COBOL, Apex, PHP, Kotlin, Ruby, Scala, HTML, CSS, ABAP, Flex, Objective-C, PL/I, PL/SQL, RPG, T-SQL, VB.NET, VB6, and XML.

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

  1. Go to the Link →

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

  1. Go to the Link →
  2. 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