sonarscanner_dart 0.1.0

  • Readme
  • Changelog
  • Installing
  • 62

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:



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 #


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/ --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/ --report-path build/tests.output --

0.1.0 #

  • Generate
  • Run sonar-scanner

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate sonarscanner_dart

2. Use it

The package has the following executables:

$ sonarscanner_dart

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  sonarscanner_dart: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:sonarscanner_dart/sonarscanner_dart.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Analysis suggestions

Package not compatible with SDK dart

because of import path [sonarscanner_dart, moronepo] that is in a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

1 out of 1 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/command/generate_command.dart.

Run dartfmt to format lib/src/command/generate_command.dart.

Format lib/src/command/run_command.dart.

Run dartfmt to format lib/src/command/run_command.dart.

Format lib/src/command/sonarscanner_dart_command_runner.dart.

Run dartfmt to format lib/src/command/sonarscanner_dart_command_runner.dart.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/downloader/downloader.dart (Run dartfmt to format lib/src/downloader/downloader.dart.)
  • lib/src/module_finder/module_finder.dart (Run dartfmt to format lib/src/module_finder/module_finder.dart.)
  • lib/src/properties/properties_writer.dart (Run dartfmt to format lib/src/properties/properties_writer.dart.)

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and sonarscanner_dart.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
archive ^2.0.13 2.0.13
args ^1.5.2 1.6.0
equatable ^1.1.1 1.2.0
http ^0.12.1 0.12.1
logging ^0.11.4 0.11.4
meta ^1.1.7 1.1.8
moronepo ^0.1.2 0.1.3
path ^1.6.4 1.7.0
quiver ^2.0.0 2.1.3
Transitive dependencies
async 2.4.1
charcode 1.1.3
checked_yaml 1.0.2
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
flutter 0.0.0
glob 1.2.0
http_parser 3.1.4
js 0.6.2
json_annotation 2.4.0 3.0.1
node_interop 1.1.1
node_io 1.1.1
pub_semver 1.4.4
pubspec_parse 0.1.5
sky_engine 0.0.99
source_span 1.7.0
stack_trace 1.9.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8
yaml 2.2.1
Dev dependencies
matcher ^0.12.5 0.12.8
mockito ^4.1.1
pedantic ^1.8.0+1 1.9.0 1.9.1
test ^1.6.3
test_coverage ^0.4.1