Anthony Sottile
b1389603e0
Speed up filename filtering.
...
Before there was a `getcwd` syscall for every filename which was filtered.
Instead this is now cached per-run.
- When all files are identified by filename only: ~45% improvement
- When no files are identified by filename only: ~55% improvement
This makes little difference to overall execution, the bigger win is
eliminating the `memoize_by_cwd` hack. Just removing the memoization would
have *increased* the runtime by 300-500%.
2019-01-23 20:48:41 -08:00
Anthony Sottile
fc84567923
Default local / meta through cfgv
2019-01-05 08:31:03 -08:00
Anthony Sottile
c577ed92e7
Refactor pre_commit.repository and factor out cached-property
2018-12-30 20:56:49 -08:00
Anthony Sottile
a49a34ef3d
Add identity meta hook
2018-12-29 13:13:31 -08:00
George Y. Kussumoto
1b496c5fc3
Fix check-useless-exclude to consider types filter
2018-10-02 12:17:46 -03:00
Anthony Sottile
ce25b652b9
Exempt language: fail hooks from check-hooks-apply
2018-09-02 18:54:34 -07:00
Anthony Sottile
c01ffc83f8
Separate store from runner
2018-06-29 22:35:53 -07:00
Anthony Sottile
bdad930d71
Move pre_commit.schema to cfgv library
2018-02-18 15:25:53 -08:00
Anthony Sottile
ae5b74ad38
always_run hooks always apply to the repository
2017-11-03 09:30:03 -07:00
Anthony Sottile
e99813f117
Rename check-files-matches-any to check-hooks-apply
2017-11-03 09:18:58 -07:00
Anthony Sottile
5a8ca2ffbe
Some minor fixups
2017-10-30 09:12:48 -07:00
Paul Hooijenga
9db827ef9d
Refactor meta hooks
2017-10-28 13:59:11 +02:00
Paul Hooijenga
8a0dd01c7e
Implement check-files-matches-any meta hook
2017-10-25 10:09:44 +02:00
Paul Hooijenga
8df11ee7aa
Implement check-useless-excludes meta hook
2017-10-25 10:09:43 +02:00