grinder_coveralls 2.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 66

Grinder-Coveralls #

Runtime Release License Coverage Build

Grinder plug-in collecting your code coverage as LCOV and uploading it to the Coveralls service.

This library was created to run tests on the Dart VM exclusively. It has not been tested and likely won't work for compiled Dart code (i.e. Flutter or JavaScript).

Documentation #

Development #

License #

Grinder-Coveralls is distributed under the MIT License.

Changelog #

Version 2.0.0

  • Breaking change: replaced the collectFromDirectory(), collectFromFile() and collectFromFiles() methods from the Collector class by the run() one.
  • Breaking change: using glob patterns instead of FileSystemEntity parameters for providing the list of files to be tested.
  • Raised the Dart SDK constraint.
  • Replaced Travis CI by GitHub Actions for the continuous integration.
  • Updated the package dependencies.

Version 1.1.1

  • Fixed the issue #2: a breaking change was introduced in the coverage package.
  • Updated the package dependencies.

Version 1.1.0

  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 1.0.0

  • First stable release.
  • Raised the Dart SDK constraint.
  • Using new language features: collection if and spread operator.
  • Updated the package dependencies.

Version 0.2.0

  • Added unit tests.
  • Updated the documentation.

Version 0.1.0 #

  • Initial release.


import 'package:grinder/grinder.dart';
import 'package:grinder_coveralls/grinder_coveralls.dart';

@Task('Collects and uploads the coverage data in one pass')
Future<void> collectAndUploadCodeCoverage() async =>
  uploadCoverage(await collectCoverage('test/**_test.dart', reportOn: [libDir.path]));

@Task('Collects the coverage data and saves it as LCOV format')
Future<void> collectCodeCoverage() =>
  collectCoverage('test/**_test.dart', reportOn: [libDir.path], saveAs: 'path/to/');

@Task('Uploads the LCOV coverage report to the Coveralls service')
Future<void> uploadCoverageReport() async =>
  uploadCoverage(await getFile('path/to/').readAsString());

Use this package as a library

1. Depend on it

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

  grinder_coveralls: ^2.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:grinder_coveralls/grinder_coveralls.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 Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/collector.dart. (-1.49 points)

Analysis of lib/src/collector.dart reported 3 hints:

line 44 col 7: DO use curly braces for all flow control structures.

line 47 col 7: DO use curly braces for all flow control structures.

line 132 col 7: DO use curly braces for all flow control structures.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
code_builder ^3.2.0 3.2.1
coverage ^0.13.2 0.13.3+3
coveralls ^5.6.0 5.6.0
crypto ^2.1.3 2.1.4
glob ^1.1.7 1.2.0
grinder ^0.8.3 0.8.3+1
Transitive dependencies
args 1.5.2
async 2.4.0
build_cli_annotations 1.1.0
built_collection 4.3.2
built_value 7.0.8
charcode 1.1.2
cli_util 0.1.3+2
collection 1.14.12
convert 2.1.1
fixnum 0.10.11
http 0.12.0+4
http_parser 3.1.3
js 0.6.1+1
json_annotation 3.0.1
lcov 5.5.0
logging 0.11.4
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
pedantic 1.9.0
petitparser 3.0.0
quiver 2.1.2+1
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vm_service 2.3.1
where 6.5.0
xml 3.7.0
yaml 2.2.0
Dev dependencies
path ^1.6.4 1.6.4
test ^1.6.11