allow matching on files whose content is not present
Anything that needs to examine the file content will fail to match, or fall back to other available information. But the intent is that the matcher be checked for matchNeedsFileContent and only be used if it does not, so the exact behavior doesn't much matter as it should never happen. The real point of this is to not need to provide a dummy content file when matching. This commit was sponsored by Martin D on Patreon.
This commit is contained in:
parent
9e676f062f
commit
00dbe35fbc
11 changed files with 40 additions and 30 deletions
|
@ -25,8 +25,9 @@ data MatchInfo
|
|||
| MatchingInfo ProvidedInfo
|
||||
|
||||
data FileInfo = FileInfo
|
||||
{ currFile :: RawFilePath
|
||||
-- ^ current path to the file, for operations that examine it
|
||||
{ contentFile :: Maybe RawFilePath
|
||||
-- ^ path to a file containing the content, for operations
|
||||
-- that examine it
|
||||
, matchFile :: RawFilePath
|
||||
-- ^ filepath to match on; may be relative to top of repo or cwd
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue