Open bdepardo opened 2 years ago
The one thing I see here is a usability issue. The current approach is to fail, if a file does not contain the configured version pattern. I think if you match 100 files, then perhaps the pattern is only applicable to a subset of the files. I usually don't put copyright headers on my test files for example. Other than that concern, I think it can be implemented in principle.
I agree that not all files might need to include the copyright. With globs it will not be possible to specify a pattern that could exclude some directories, we would need more advanced regexp for that. Though having a recursive glob pattern would be an improvement I think. For example our project currently has ~200 different directories (django-based project), so in our case having to write and maintain the pattern for all these directories would be much more complicated that just adding the copyright in our test files.
Hi,
Would it be possible to specify recursive file patterns to search for all *.py files in a project. I tried with
But it does not find python files. I saw in
bumpver
code that you are usingglob
, but that the recursive parameter is unset (and thusFalse
).Thanks