Remove restriction on file extension for some parsers #128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 aparticular 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 anywaydue to the
globs
method.Closes #127