sonarscanner_dart

pub package Build Status codecov

The SonarScanner for Dart provides an easy way to start SonarQube analysis of a dart project.

Currently, it supports following commands:

generate

run

Usage

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

generate command

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

run command

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

Libraries

sonarscanner_dart