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.
Problem
All files are now run through a parser's
matches?
method, which is causing issues for the lcov, gcov, and simplecov parsers since thematches?
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 theglobs
method.Closes #127