coverallsapp / coverage-reporter

Self-contained, universal coverage uploader binary. Under development.
https://coveralls.io
MIT License
45 stars 14 forks source link

Remove restriction on file extension for some parsers #128

Closed littleforest closed 1 month ago

littleforest commented 1 month ago

Problem

All files are now run through a parser's matches? method, which is causing issues for the lcov, gcov, and simplecov parsers since the matches? method checks that files have a particular file extension. This is causing failures when users pass a custom file.

Solution

The lcov, gcov, and simplecov parsers were moved to the last in the array of parsers, since they are the only parsers which do not check actual file contents to see if a file is of the correct format. In order to ensure that these three parsers will not erroneously match on files of the other two types, we modify the matches? method to return false if file extensions of the other two parsers are matched.

If a user is passing a custom gcov, simplecov, or lcov parser with a non-standard file extension, then they must specify the --format parameter.

If the user does not specify a custom file, then only files that match the extensions formerly listed in the matches? method will be returned anyway due to the globs method.

Closes #127

coveralls-official[bot] commented 1 month ago

Pull Request Test Coverage Report for Build 9196041165

Details


Totals Coverage Status
Change from base Build 9162110219: 0.01%
Covered Lines: 906
Relevant Lines: 964

💛 - Coveralls