Please note that this repository is not maintained anymore and will be made private to Meniga no later than on 31 december 2023. It is suggested that those using this repository will either fork it or find another tool that provides the same functionality
The SonarScanner for Dart provides an easy way to start SonarQube analysis of a dart project.
Currently, it supports following commands:
Activate sonarscanner_dart
:
pub global activate sonarscanner_dart
or prepend each command with flutter
if used:
flutter pub global activate sonarscanner_dart
Now it should be possible to run sonarscanner_dart
:
sonarscanner_dart [--working-directory <path>] <command>
You can also follow how to set up a global command
to make it available as a regular shell command by appending PATH
.
sonarscanner_dart generate
or creating an alias instead:
alias sonarscanner_dart="flutter pub global run sonarscanner_dart"
sonarscanner_dart generate
Generates sonar-project.properties
sonarscanner_dart generate [--coverage-path <path_to_lcov_file>] [--report-path <path_to_machine_test_output>] [path_to_properties_file]
For example:
sonarscanner_dart generate --coverage-path build/lcov.info --report-path build/tests.output
Runs sonar-scanner. It is also possible to pass additional properties after --
.
sonarscanner_dart run [--coverage-path <path_to_lcov_file>] [--report-path <path_to_machine_test_output>]
For example:
sonarscanner_dart run --coverage-path build/lcov.info --report-path build/tests.output -- -Dproject.settings=sonar-project.properties