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.

example/main.dart

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/lcov.info');

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

Use this package as a library

1. Depend on it

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


dependencies:
  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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
34
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: other

Primary library: package:grinder_coveralls/grinder_coveralls.dart with components: io, mirrors.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
code_builder ^3.2.0 3.2.0
coverage ^0.13.2 0.13.3
coveralls ^5.6.0 5.6.0
crypto ^2.1.3 2.1.3
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.2.2
built_value 6.7.1
charcode 1.1.2
cli_util 0.1.3+2
collection 1.14.12
convert 2.1.1
fixnum 0.10.9
http 0.12.0+2
http_parser 3.1.3
js 0.6.1+1
json_annotation 3.0.0
lcov 5.4.0
logging 0.11.3+2
matcher 0.12.5
meta 1.1.7
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
pedantic 1.8.0+1
petitparser 2.4.0
quiver 2.0.5
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vm_service 1.2.0 2.1.1
where 6.4.0
xml 3.5.0
yaml 2.2.0
Dev dependencies
path ^1.6.4 1.6.4
test ^1.6.11