From 1838dcee536df819078902f0c54825d950dc3f26 Mon Sep 17 00:00:00 2001 From: Tales Barreto Date: Sat, 24 Jan 2026 14:13:07 -0300 Subject: [PATCH 1/2] update: v2.1.4 --- CHANGELOG.md | 4 ++++ README.md | 11 +++++++++++ pubspec.yaml | 12 ++++++------ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80271d1..92b4ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.4 +- Document maintenance mode status in README +- Bump dependencies: args 2.7.0, file 7.0.1, glob 2.1.3, yaml 3.1.3, path 1.9.1 + ## 2.1.3 - Update docs - Bump args dependency to 2.5.0 diff --git a/README.md b/README.md index 443d09b..6323afc 100644 --- a/README.md +++ b/README.md @@ -140,3 +140,14 @@ ___ - **0** - Tests passed. - **1** - Tests failed (only when thresholds are set). - **255** - Execution has failed and tests were not executed. + + +## Current state + +This project has entered *Maintenance Mode*. + +At this stage, the software is considered feature-complete and stable. Development efforts are focused on bug fixes and dependency version updates + +No new features or breaking changes are planned. + +Updates may be released infrequently, but the project is actively maintained and not abandoned. Issues will continue to be addressed when raised. \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index cac125d..7decabd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: pull_request_coverage description: "A diff coverage tool. It provides a clear and achievable standard for code review: If you touch a line of code, that line should be covered." repository: https://github.com/talesbarreto/pull_request_coverage -version: 2.1.3 +version: 2.1.4 topics: - test - coverage @@ -20,11 +20,11 @@ environment: sdk: '>=2.17.0 <4.0.0' dependencies: - args: ^2.5.0 - file: ^7.0.0 - glob: ^2.1.2 - yaml: ^3.1.2 - path: ^1.9.0 + args: ^2.7.0 + file: ^7.0.1 + glob: ^2.1.3 + yaml: ^3.1.3 + path: ^1.9.1 dev_dependencies: test: ^1.24.7 From adea21e34ca3acef032a0a634ef3b6b876ba2e97 Mon Sep 17 00:00:00 2001 From: Tales Barreto Date: Sat, 24 Jan 2026 14:17:39 -0300 Subject: [PATCH 2/2] doc: updatig Readme --- README.md | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 6323afc..7fc5e76 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,15 @@ ## Motivation -The coverage rate threshold on CI tools is a common approach to encourage developers to write tests. However, judging a pull request solely based on the coverage rate of the entire project is not always fair, particularly when it comes to significant refactor tasks that may naturally reduce the coverage rate. +The coverage rate threshold on CI tools is a common approach to encourage developers to write tests. However, judging a pull request solely on the project's overall coverage rate is not always fair, particularly for significant refactoring tasks that may naturally reduce coverage. This package adopts a different approach to analyze test coverage: it specifically focuses on checking the lines added in the pull request. The coverage rate is then calculated by dividing the number of uncovered new lines by the total number of new lines. -In addition, you have the option to set thresholds that will cause tests to fail on a CI tool. Furthermore, this package can also generate a report highlighting the uncovered code, making it easier to identify areas that require additional tests. +In addition, you have the option to set thresholds that will cause tests to fail on a CI tool. Furthermore, this package can generate a report highlighting uncovered code, making it easier to identify areas that require additional testing. ## Installing -There are two ways to install the `pull_request_coverage` package. Since it is a binary package, you can activate it from the command line by using the command `dart pub global activate pull_request_coverage`. This will allow you to use it as a standalone program on your command-line interface (CLI). Alternatively, you can add it to the `dev_dependencies` section of your project's `pubspec.yaml` file. +There are two ways to install the `pull_request_coverage` package. Since it is a binary package, you can activate it from the command line with `dart pub global activate pull_request_coverage`. This will allow you to use it as a standalone program on your command-line interface (CLI). Alternatively, you can add it to the `dev_dependencies` section of your project's `pubspec.yaml` file. ℹ️ [Github Actions example](https://github.com/talesbarreto/uri_content/blob/main/.github/workflows/flutter-ci.yml) @@ -37,7 +37,7 @@ If you want to analyze a Dart project rather than Flutter, use the [coverage pac ### Running pull_request_coverage -To check the PR's code, pull_request_coverage needs a diff between its branch and the target one. The diff is read from the `STDIN` input. +To check the PR's code, pull_request_coverage needs a diff between the PR's branch and the target branch. The diff is read from `STDIN`. You can pipe the `STDIN` to `pull_request_coverage` using bash's `|` operator, like this: @@ -58,7 +58,7 @@ There are two ways to configure the execution of `pull_request_coverage`: using By default, `pull_request_coverage` looks for the `./pull_request_coverage.yaml` file to load its settings. You can override this by using the `config-file` argument. -Both methods support the same settings, and if a setting is provided through both CLI arguments and the YAML file, the value from the CLI arguments will take precedence. +Both methods support the same settings, and if a setting is provided in both the CLI arguments and the YAML file, the value from the CLI arguments takes precedence. #### Examples ##### CLI args @@ -86,11 +86,11 @@ Default values are indicated in parentheses. ### Threshold -- **minimum-coverage** : Specifies the minimum coverage rate required for the tests to pass. +- **minimum-coverage**: Specifies the minimum coverage rate required for the tests to pass. -- **maximum-uncovered-lines** : Specifies the maximum number of uncovered lines allowed before the tests fail. +- **maximum-uncovered-lines**: Specifies the maximum number of uncovered lines allowed before the tests fail. -- **approval-requirement** (`lines-and-rate`): when both, `minimum-coverage` and `maximum-uncovered-lines`, are specified, the `approval-requirement` determines the conditions for passing the tests. +- **approval-requirement** (`lines-and-rate`): when both `minimum-coverage` and `maximum-uncovered-lines` are specified, the `approval-requirement` determines the conditions for passing the tests. - `lines-and-rate`: both conditions must be met to pass the tests. - `lines-or-rate:` only one of the conditions must be met to pass the tests. @@ -100,7 +100,7 @@ Default values are indicated in parentheses. - **ignore-lines**: A list of regular expressions used to filter lines in the source code. The cumulative count of ignored lines will be shown in the report for statistical purposes only. -- **ignore-known-generated-files** (`true`) : Ignores file paths that end with `.g.dart`, `.pb.dart`, `.pbenum.dart`, `.pbserver.dart` or `.pbjson.dart` +- **ignore-known-generated-files** (`true`) : Ignores file paths that end with `.g.dart`, `.pb.dart`, `.pbenum.dart`, `.pbserver.dart` or `.pbjson.dart`. - **add-to-known-generated-files**: list of [glob matchers](https://pub.dev/packages/glob#syntax) to extend the list specified in `ignore-known-generated-files`. Unlike `ignore`, the lines matched by these patterns will be completely excluded from the report. @@ -118,15 +118,15 @@ Check [example](https://github.com/talesbarreto/pull_request_coverage/tree/main/ - **report-fully-covered-files** (`true`): Prints the file path of each fully covered file as a celebratory message =) -- **show-uncovered-code** (`true`): When set to `true`, the source code of the uncovered lines will be printed in red font color, making it easier to identify the missing tests. If this parameter is set to `false`, only the file path will be shown in the log. +- **show-uncovered-code** (`true`): When set to `true`, the source code of the uncovered lines will be printed in red font color, making it easier to identify the missing tests. If this parameter is set to `false`, only the file path will be logged. - **use-colorful-output** (`true`): By default, `pull_request_coverage` utilizes a colorful font to highlight uncovered lines. You can disable this feature by setting this parameter to `false`. Please note that this option is only available when the output mode is set to `cli`. -- **print-emojis** (`true`) : Enable or disabled emojis in the output 🫣. +- **print-emojis** (`true`): Enable or disable emojis in the output 🫣. - **fraction-digits** (`2`): Specifies the number of digits to display after the decimal point in the coverage rate. -- **fully-tested-message** : Replace the final table report with a custom message when there are no untested lines +- **fully-tested-message**: Replace the final table report with a custom message when there are no untested lines ### Under the hood @@ -139,15 +139,14 @@ ___ - **0** - Tests passed. - **1** - Tests failed (only when thresholds are set). -- **255** - Execution has failed and tests were not executed. - +- **255** - Execution has failed, and tests were not executed. ## Current state -This project has entered *Maintenance Mode*. +This project has entered **Maintenance Mode**. At this stage, the software is considered feature-complete and stable. Development efforts are focused on bug fixes and dependency version updates No new features or breaking changes are planned. -Updates may be released infrequently, but the project is actively maintained and not abandoned. Issues will continue to be addressed when raised. \ No newline at end of file +Updates may be released infrequently, but the project is actively maintained and not abandoned. Issues will continue to be addressed when raised.