A set of commands for coverage info files manipulation.

Overview

Coverage Utils

style: very good analysis License: MIT

A set of commands for coverage info files manipulation.


Installing

$ dart pub global activate --source git https://github.com/mrverdant13/coverde.git

Commands

$ coverde

Coverage info actions.

" for more information about a command. ">
A set of commands that encapsulate coverage-related functionalities.

Usage: cov  [arguments]

Global options:
-h, --help    Print this usage information.

Available commands:
  filter   Filter a coverage info file.
  remove   Remove a set of files and folders.
  value    Compute the coverage value (%) of an info file.

Run "cov help " for more information about a command.

coverde sub-commands

coverde filter

Destination coverage info file to dump the resulting coverage data into. (defaults to "coverage/wiped.lcov.info") Run "cov help" to see global options. ">
Filter a coverage info file.

Filter the coverage info by ignoring data related to files with paths that matches the given PATTERNS.
The coverage data is taken from the ORIGIN_LCOV_FILE file and the result is appended to the DESTINATION_LCOV_FILE file.

Usage: cov filter [arguments]
-h, --help                                   Print this usage information.
-i, --ignore-patterns=
    
                  Set of comma-separated path patterns of the files to be ignored.
                                             Consider that the coverage info of each file is checked as a multiline block.
                                             Each bloc starts with `SF:` and ends with `end_of_record`.
-o, --origin=
     
                    Origin coverage info file to pick coverage data from.
                                             (defaults to "coverage/lcov.info")
-d, --destination=
      
           Destination coverage info file to dump the resulting coverage data into.
                                             (defaults to "coverage/wiped.lcov.info")

Run "cov help" to see global options.

      
     
    

coverde remove

Remove a set of files and folders.

Usage: cov remove [arguments]
-h, --help                   Print this usage information.
    --[no-]accept-absence    Accept absence of a file or folder.
                             When an element is not present:
                             - If enabled, the command will continue.
                             - If disabled, the command will fail.
                             (defaults to on)

Run "cov help" to see global options.

coverde value

Compute the coverage value (%) of an info file.

Compute the coverage value of the LCOV_FILE info file.

Usage: cov value [arguments]
-h, --help                Print this usage information.
-f, --file=
    
         Coverage info file to be used for the coverage value computation.
                          (defaults to "coverage/lcov.info")
-p, --[no-]print-files    Print coverage value for each source file listed in the LCOV_FILE info file.
                          (defaults to on)

Run "cov help" to see global options.

    

Comments
  • [RFC] Join all commands under an umbrella command `coverde`

    [RFC] Join all commands under an umbrella command `coverde`

    The current trend in Dart CLI is to have a a single ring to rule them all and the currently, this project has two commands: cov and x.

    Why not to have a coverde command with the following API:

    coverde filter  
    coverde value  
    coverde rm  
    

    If you agree, I would like to send the PR.

    refactor 
    opened by kranfix 2
  • fix: ensure safe dir path construction

    fix: ensure safe dir path construction

    Description

    For folder structures with single child nested folders, the report tool had issues when generating relative paths. This PR ensures relative path construction is safe.

    bug 
    opened by mrverdant13 1
  • feat: ask for confirmation to ovewrite existing file when filtering

    feat: ask for confirmation to ovewrite existing file when filtering

    Description

    At the moment, coverde filter only appends the filtered content to the destination file.

    It would be handy to provide a flag and/or ask for user confirmation to overwrite the destination file content.

    enhancement feature 
    opened by mrverdant13 0
  • feat: add min cov check functionality

    feat: add min cov check functionality

    Description

    For CI workflows, a coverage check step is often used.

    For GitHub there are alternatives like very_good_coverage.

    However, for other repo hosters, there are few or no alternatives at all.

    Alternatives

    Alternative 1

    Add an optional --min option to the coverde value command that allows defining a coverage threshold that will make the execution fail.

    This way, using coverde value --min=90 will fail if the coverage is lower than 90%.

    Alternative 2

    Add the coverde check command with an additional argument that allows defining a coverage threshold that will make the execution fail.

    This way, using coverde check 90 will fail if the coverage is lower than 90%. If no threshold argument is passed, a value of 100(100%) would be used.

    feature 
    opened by mrverdant13 0
  • bug: Different path on filtered result.

    bug: Different path on filtered result.

    The result of the filter command is changing the path to an absolute one, which in turn makes the coverde report command to fail with the error below.

    lcov.info

    SF:lib/cubit/dashboard/dashboard_cubit.dart

    filtered.lcov.info

    SF:/Users/jcquintas/learner_app_flutter/lib/cubit/dashboard/dashboard_cubit.dart

    Error

    FileSystemException: Cannot open file, path = 'Users/jcquintas/learner_app_flutter/lib/cubit/dashboard/dashboard_cubit.dart' (OS Error: No such file or directory, errno = 2)
    #0      _File.throwIfError (dart:io/file_impl.dart:635:7)
    #1      _File.openSync (dart:io/file_impl.dart:479:5)
    #2      _File.readAsBytesSync (dart:io/file_impl.dart:539:18)
    #3      _File.readAsStringSync (dart:io/file_impl.dart:584:18)
    #4      _File.readAsLinesSync (dart:io/file_impl.dart:590:36)
    #5      CovFile.generateSubReport (package:coverde/src/entities/cov_file.dart:179:34)
    #6      CovDir.generateSubReport (package:coverde/src/entities/cov_dir.dart:270:17)
    #7      CovDir.generateSubReport (package:coverde/src/entities/cov_dir.dart:270:17)
    #8      CovDir.generateSubReport (package:coverde/src/entities/cov_dir.dart:270:17)
    #9      CovDir.generateReport (package:coverde/src/entities/cov_dir.dart:190:7)
    #10     ReportCommand.run (package:coverde/src/commands/report/report.dart:169:9)
    #11     CommandRunner.runCommand (package:args/command_runner.dart:209:27)
    #12     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:119:25)
    #13     new Future.sync (dart:async/future.dart:301:31)
    #14     CommandRunner.run (package:args/command_runner.dart:119:14)
    #15     coverde (package:coverde/src/commands/coverde.dart:24:16)
    #16     main (file:///Users/jcquintas/.pub-cache/hosted/pub.dartlang.org/coverde-0.1.0+1/bin/coverde.dart:10:18)
    #17     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
    #18     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
    

    Commands

    flutter test --coverage
    coverde filter -f '\.g.dart,\.freezed.dart' -m w
    coverde report -i filtered.lcov.info
    
    opened by JCQuintas 0
Releases(coverde-v0.1.0+1)
  • coverde-v0.1.0+1(Dec 2, 2021)

    • FIX: use proper version for update check.
    • DOCS: set README images URLs.
    • FEAT: create check command.
    • FEAT: create filter command.
    • FEAT: create remove command.
    • FEAT: create report command.
    • FEAT: create value command.
    • TEST: ensure 100% test coverage.
    Source code(tar.gz)
    Source code(zip)
Owner
Karlo Verde
Karlo Verde
A comprehensive, cross-platform path manipulation library for Dart.

A comprehensive, cross-platform path manipulation library for Dart. The path package provides common operations for manipulating paths: joining, split

Dart 159 Dec 29, 2022
Official Git of flutter code-push made by Chimera inc. If you want to get more info or seek for biz corporation, you can contact [email protected].

中文版 Chimera Flutter Code Push Chimera is a Dart compiler developed by ourselves, which generates interpretable and executable bytecode to implement co

Waytoon 21 Oct 6, 2022
Command-line tool to provide null-safety percentage info of a project. Track your migration progress on mixed-version programs that execute with unsound null safety.

null_safety_percentage Command-line tool to provide null-safety percentage info of a project. Track your migration progress on mixed-version programs

dartside.dev 8 Mar 27, 2022
🔥FlutterFire is a set of Flutter plugins that enable Flutter apps to use Firebase services.

FlutterFire is a set of Flutter plugins that enable Flutter apps to use Firebase services. You can follow an example that shows how to use these plugins in the Firebase for Flutter codelab.

null 7.4k Jan 2, 2023
This project aims to basically listing crypto market prices and set alarms.

trader This project aims to basically listing crypto market prices and set alarms. Also, it is starting point of Flutter with GetX state management. B

Görkem Sarı 2 Oct 31, 2021
A set of flutter formatters for text and input fields

A set of formatters for text and input fields. Not only it can format a phone number but also automatically detect a country dial code and the name of the country. It also can apply formatting for currencies e.g. you need to convert 100000 into a USD currency value representation.

Konstantin Serov 215 Dec 12, 2022
Quiver is a set of utility libraries for Dart that makes using many Dart libraries easier and more convenient, or adds additional functionality.

Quiver is a set of utility libraries for Dart that makes using many Dart libraries easier and more convenient, or adds additional functionality.

Google 905 Jan 2, 2023
Rows lint contains a set of lint rules for dart projects used by projects at Rows GmbH

Rows lint contains a set of lint rules for dart projects used by projects at Rows GmbH

rows 6 Apr 12, 2022
A cli tool to run Flutter applications and auto hot reload it when files are changed

Dashmon A minimalistic CLI tool to run Flutter applications and auto hot reload it when files are changed. It will watch changes your application code

Erick 31 Oct 6, 2022
A CLI for syncing Dart dependency versions between pubspec.yaml and pubspec.lock files.

lockpick A CLI for syncing Dart dependency versions between pubspec.yaml and pubspec.lock files. ?? Usage # Activate lockpick pub global activate lock

Jeroen Meijer (Jay) 34 Oct 17, 2022
A generator to create config class from json files that support many environments

A generator to create config class from json files that support many environments. Motivation If you use a json file to config your applications, perp

Diego Cardenas 0 Oct 9, 2021
A CLI tool to help batch renaming files.

batch_rename A CLI tool to enable batch renaming of files. Installation Clone the repo and add bin/batch_rename.exe to PATH: gh repo clone POWRFULCOW8

Diego Domínguez Melo 0 Nov 3, 2021
Flutter package to parse iCalendar (.ics) files.

icalendar_parser Package to parse iCalendar (.ics) files written in pure Dart. Implementation of AnyFetch's ics-parser in JavaScript. Getting Started

Guillaume Roux 27 Jan 3, 2023
null 2 Apr 17, 2022
A set of commands for coverage tracefiles manipulation.

Coverage Utils A set of commands for coverage info files manipulation. Installing $ dart pub global activate --source git https://github.com/mrverdant

Karlo Verde 22 Oct 9, 2022
A package script for allowing coverage test tool to see all Dart files

full_coverage Coverage tools like codecov only see the files that were actually triggered by tests. This means that a coverage of 100% can easily be a

Flutterando 2 Mar 18, 2022
D info - Flutter package for response info message

D'Info Flutter package for response info message. It's like bootstrap view but s

Indra Trisna Raharja 4 Oct 26, 2022
Battery+ is an open source battery info and device info for Android.

Battery+ Battery+ is an open source battery info and device info for Android.

Keshav Pratap K 1 Sep 26, 2022
The Integration Test Helper has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage.

The Integration Test Helper has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage (using Android and iOS

The Mobile Applications Community 2 Apr 7, 2022
A CLI tool to verify the test coverage of a pull request only, ignoring the rest of the project

This is a CI tool that analyzes the coverage rate of a pull request, ignoring the lines that were not changed in the PR. Motivation The coverage rate

Tales Barreto 3 Dec 15, 2022