Contrary to #19, making --force-exclude an implicit default can cause confusing behaviors. As some CI environments might run under paths that are excluded by default or excluded by custom configuration.
For example, the Bitbucket pipeline runs under /opt/atlassian/pipelines/agent/build, which is excluded by default (build), so running pre-commit run --all-files takes no effect at all, but it totally works as expected under local repo, really confusing!
Take me quite some time to figure out why our CI is not working, apparently, others have the same problem.
I suggest making the --force-exclude an opt-in, or at least add a reminder in README for setting --no-force-exclude.
Contrary to #19, making
--force-excludean implicit default can cause confusing behaviors. As some CI environments might run under paths that are excluded by default or excluded by custom configuration.For example, the Bitbucket pipeline runs under
/opt/atlassian/pipelines/agent/build, which is excluded by default (build), so runningpre-commit run --all-filestakes no effect at all, but it totally works as expected under local repo, really confusing!Take me quite some time to figure out why our CI is not working, apparently, others have the same problem.
I suggest making the
--force-excludean opt-in, or at least add a reminder in README for setting--no-force-exclude.