duvet 0.0.2

Duvet #

Duvet generates nice-looking coverage reports for your Dart projects.

Duvet coverage report screenshot

Installation #

Add Duvet to your project by adding the following to your pubspec.yaml:

  duvet: ^1.0.0

You can also install duvet globally with the following:

$ pub global activate duvet

Usage #

Once added to a project, you can generate a coverage report by running:

$ pub run duvet:duvet_cover

If you installed duvet globally, you can generate a report by running:

$ duvet_cover

duvet will then run your tests and collect coverage, outputting the report to a coverage directory. You can also pass the --serve option to automatically start a webserver to access the coverage reports.

Example Report #

You can view a sample coverage report for the dart_style package here.

How it works #

duvet works by running the test package against your project, and then using the coverage package to collect coverage information. It then assembles reports using hyper, and serves the reports using shelf.

0.0.2 #

  • Add executable to pubspec.yaml

0.0.1 #

  • Initial version, created by Stagehand

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate duvet

2. Use it

The package has the following executables:

$ duvet_cover

Use this package as a library

1. Depend on it

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

  duvet: ^0.0.2

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:duvet/duvet.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 Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/duvet_base.dart. (-0.50 points)

Analysis of lib/src/duvet_base.dart reported 1 hint:

line 65 col 20: Unnecessary new keyword.

Fix lib/src/executable.dart. (-0.50 points)

Analysis of lib/src/executable.dart reported 1 hint:

line 69 col 5: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (coverage).

Package is getting outdated. (-14.52 points)

The package was last published 59 weeks ago.

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 duvet.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
args ^1.5.1 1.5.2
coverage ^0.12.3 0.12.4 0.13.6
hyper ^1.0.1 1.1.0
meta ^1.1.6 1.1.8
path ^1.6.2 1.6.4
sass ^1.15.2 1.25.0 1.26.0-test.3
shelf ^0.7.4 0.7.5
shelf_static ^0.2.8 0.2.8
Transitive dependencies
async 2.4.0
charcode 1.1.3
cli_repl 0.2.0+1
collection 1.14.12
convert 2.1.1
crypto 2.1.4
http 0.12.0+4
http_parser 3.1.3
js 0.6.1+1
json_rpc_2 2.1.0
logging 0.11.4
matcher 0.12.6
mime 0.9.6+3
package_config 1.1.0
package_resolver 1.0.10
pedantic 1.9.0
pub_semver 1.4.3
quiver 2.1.2+1
source_maps 0.10.9
source_span 1.6.0
stack_trace 1.9.3
stream_channel 2.0.0
stream_transform 1.1.0
string_scanner 1.0.5
term_glyph 1.1.0
tuple 1.0.3
typed_data 1.1.6
vm_service_client 0.2.6+3
watcher 0.9.7+13
web_socket_channel 1.1.0
Dev dependencies
test ^1.0.0