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.