Closed abyss638 closed 9 months ago
Looks great, thanks for this!
A few comments to discuss/resolve
I think we should do something to help ease the transition for users, e.g. write a page about migrating from blame-filter to filter, check the --blame-filter argument and point people to the page. But that might be better as a separate PR to keep this one small.
BREAKING CHANGE
Fixes #13
Implemented general filtering for any field in a results object. This replaces blame filtering which filtered only by author emails in blame details.
The filter format is switched from plain text to YAML.
Here is an example of a filter file (from updated README.md):
Field names must be specified as a JSONPath expression, substrings and Regex are supported as before.
For
location
which represents a file location wildcards are supported:?
- a single occurrence of any character in a directory or file name*
- zero or more occurrences of any character in a directory or file name**
- zero or more occurrences across multiple directory levelsAdded a Pytest UTs for filtering code.
FilterStats
is extracted to a standalone file and simplified (removed few no longer needed counters).'GeneralFilter' is based on an extracted
BlameFilter
.