coveralls 5.4.0

Coveralls for Dart #

Runtime Release License Coverage Build

Send LCOV and Clover coverage reports to the Coveralls service, in Dart.

Documentation #

Development #

License #

Coveralls for Dart is distributed under the MIT License.

Changelog #

Version 5.4.0

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

Version 5.3.0

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

Version 5.2.0

  • Raised the Dart SDK constraint.
  • Updated the package dependencies.
  • Updated the URL of the default API endpoint.

Version 5.1.0

  • Updated the package dependencies.
  • Updated the URL of the Git repository.

Version 5.0.0

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

Version 4.3.0

  • Improved the handling of SSH-based Git remotes.
  • Updated the package dependencies.

Version 4.2.0

  • Updated the package dependencies.

Version 4.1.0

  • Updated the package dependencies.

Version 4.0.0

  • Breaking change: the Configuration.fromEnvironment() constructor is now an asynchronous static method.
  • Using deferred loading for the services.
  • Updated the package dependencies.

Version 3.2.0

  • Added the Options class, used by the command line interface.
  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 3.1.0

  • Added a user guide based on MkDocs.
  • Added an example code.
  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 3.0.0

  • Breaking change: starting to use and support the Dart 2 SDK.
  • Using optional const and new.
  • Updated the package dependencies.

Version 2.1.0

  • Updated the package dependencies.

Version 2.0.1

  • Fixed a bug: the CLI script doesn't run when using the pub global run command.

Version 2.0.0

  • Breaking change: changed the signature of most class constructors.
  • Breaking change: most class properties are now final.
  • Raised the required Dart version.
  • Breaking change: replaced the -f|--file named argument of the CLI script by an anonymous argument (e.g. coveralls lcov.info instead of coveralls -f lcov.info)
  • Breaking change: the version property is now private.
  • Added support for Clover reports.
  • Changed licensing for the MIT License.
  • Replaced the which module by where.
  • Updated the package dependencies.

Version 1.0.0

  • First stable release.

Version 0.3.0

  • Updated the package dependencies.

Version 0.2.0

  • Updated the package dependencies.

Version 0.1.1

  • Updated the documentation.

Version 0.1.0 #

  • Initial release.

example/main.dart

import 'dart:io';
import 'package:coveralls/coveralls.dart';

/// Uploads a coverage report.
Future<void> main() async {
  try {
    final coverage = File('/path/to/coverage.report');
    await Client().upload(await coverage.readAsString());
    print('The report was sent successfully.');
  } on Exception catch (err) {
    print('An error occurred: $err');
    if (err is ClientException) print('From: ${err.uri}');
  }
}

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate coveralls

2. Use it

The package has the following executables:


$ coveralls

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, other

Primary library: package:coveralls/coveralls.dart with components: io.

Health suggestions

Fix lib/src/io/configuration.dart. (-9.99 points)

Analysis of lib/src/io/configuration.dart reported 21 hints, including:

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

line 20 col 9: DO use curly braces for all flow control structures.

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

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

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

Fix lib/src/io/client.dart. (-6.31 points)

Analysis of lib/src/io/client.dart reported 13 hints, including:

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

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

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

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

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

Fix lib/src/io/parsers/clover.dart. (-1 points)

Analysis of lib/src/io/parsers/clover.dart reported 2 hints:

line 13 col 5: DO use curly braces for all flow control structures.

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

Fix additional 3 files with analysis or formatting issues. (-2 points)

Additional issues in the following files:

  • lib/src/io/parsers/lcov.dart (2 hints)
  • bin/coveralls.dart (1 hint)
  • lib/src/io/services/travis_ci.dart (1 hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
build_cli_annotations ^1.1.0 1.1.0
crypto ^2.1.1 2.1.2
http ^0.12.0 0.12.0+2
json_annotation ^3.0.0 3.0.0
lcov ^5.4.0 5.4.0
path ^1.6.4 1.6.4
where ^6.4.0 6.4.0
xml ^3.5.0 3.5.0
yaml ^2.1.16 2.1.16
Transitive dependencies
args 1.5.2
async 2.3.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
http_parser 3.1.3
meta 1.1.7
pedantic 1.8.0+1
petitparser 2.4.0
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_cli ^1.3.3
build_runner ^1.6.5
build_test ^0.10.8
build_version ^2.0.1
coverage ^0.13.2
grinder ^0.8.3
json_serializable ^3.2.0
test ^1.6.5