4dc476f286
Whenever we use a file path filter and there are no included patterns, we default to assuming the files match. For many cases, this is fine, but this is not useful for checking whether a file is lockable: if no files are listed as lockable, then no files are lockable. Let's add an option for our filters to specify the default value if no patterns match. If that default is false, like it should be for locking, then skip traversing the exclude patterns altogether, since anything that's not included cannot change the result. We test both the case that lockable patterns are present and absent in our test. |
||
---|---|---|
.. | ||
filepathfilter_test.go | ||
filepathfilter.go |