Skip to content

minimum_coverage_by_file now prints the name of the violating file.#1103

Merged
sferik merged 4 commits intosimplecov-ruby:mainfrom
philipritchey:coverage-by-file-exit-code-patch
Mar 28, 2026
Merged

minimum_coverage_by_file now prints the name of the violating file.#1103
sferik merged 4 commits intosimplecov-ruby:mainfrom
philipritchey:coverage-by-file-exit-code-patch

Conversation

@philipritchey
Copy link
Copy Markdown
Contributor

when minimum coverage by file is set, output used to (currently) look like:

Line coverage by file (83.33%) is below the expected minimum coverage (90.00%).
Branch coverage by file (77.77%) is below the expected minimum coverage (90.00%).

now, with in <filename> at the end of the line, it (could) looks like:

Line coverage by file (83.33%) is below the expected minimum coverage (90.00%) in foo.rb.
Branch coverage by file (77.77%) is below the expected minimum coverage (90.00%) in foo.rb.

@sferik sferik force-pushed the coverage-by-file-exit-code-patch branch from b684cef to 5aace4f Compare March 28, 2026 07:15
@sferik sferik merged commit b3ba206 into simplecov-ruby:main Mar 28, 2026
10 checks passed
sferik added a commit that referenced this pull request Mar 28, 2026
Iterate result.files directly instead of zip with a parallel array,
removing an implicit ordering dependency. Use project_filename (relative
path) instead of File.basename to disambiguate files with the same name
in different directories. And align minimum_coverage_by_group output
format with by_file.

Follow-up to #1103.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants