-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hey!
Thank you so much for pydoclint! It's fantastic 🥰
This might be more of a "checking whether this is the intended behavior" than a bug, but I didn't see anything about it in earlier discussions or issues, so I figured I'd open one. I'm also happy to help with a fix if that would be useful.
Description
When running pydoclint with an existing baseline file and --auto-regenerate-baseline=True, the regeneration seems to only look at the files included in that particular run. Because of that, entries for files that weren't part of the invocation end up being removed from the baseline.
Unfortunately, this gets a bit tricky when used with pre-commit, since it defaults to only passing in the modified files to the hook.
Reproduction
-
Baseline contains entries for
a.pyandb.py. -
Fix
a.py. -
Run:
pydoclint --baseline baseline.txt --auto-regenerate-baseline=true a.pyAfter this, the regenerated baseline no longer includes the
b.pyentries.
What I expected
My assumption was that auto-regeneration would update only the parts of the baseline related to the files being checked, rather than replacing the baseline entirely based on the current run.
Proposed Fix
One possible approach would be to make --auto-regenerate-baseline update only the relevant entries while leaving the others intact. But I'm not sure whether you'd want to change the default behavior at this point.