MinimumCoverageByFileCheck with different minimum percents for each file

6 views
Skip to first unread message

Ken S

unread,
Apr 18, 2023, 8:41:07 PM4/18/23
to SimpleCov
Hi All,

I'm working on an existing codebase with 3k+ files. Some have a high percent of coverage, some not so high. I was looking to switch to checking the code coverage check to be per file, but I'm not finding a clear way to get there.

I was looking for a way to record a minimum code coverage percent per file and use that as the minimum coverage for each respective file.

After some digging I haven't found a clear way to accomplish this without writing a custom formatter and checking the output file after running Simplecov against a list of files with their minimum coverages expected.

It looks like it could be an augmentation to SimpleCov::ExitCodes::MinimumCoverageByFile and some related files to be able to specify in greater detail the minimum_expected for particular files. If the files aren't listed, I'd want to use the default minimum coverage percent. It's something like an override for specific files.

Maybe someone is aware of another way to do this?

Thanks,
Ken

Reply all
Reply to author
Forward
0 new messages