Commit graph

54 commits

Author SHA1 Message Date
anthony sottile
d2cf95b9cf deprecate check-docstring-first without replacement
this hook has unfixable false positives and is not that useful

perhaps someone can write a flake8 plugin to replace the functionality
2025-11-22 15:21:07 -05:00
Max R
5920aee766 Remove check-byte-order-marker and fix-encoding-pragma 2025-05-25 11:03:00 -04:00
Jeffrey Lim
fd011242fd Extend check for illegal Windows filenames 2024-10-05 14:10:25 -04:00
Adrian DC
c7d1e85f24 set stages for destroyed-symlinks
The 'destroyed-symlinks' hook runs upon 'commit-msg' hook,
however when used in 'git submodules', repository scope breaks

> pre_commit_hooks.util.CalledProcessError: (('git', 'status',
> '--porcelain=v2', '-z', '--', '.../COMMIT_EDITMSG'), 0, 128, '',
> b"fatal: .../COMMIT_EDITMSG: '...' is outside repository at '...'\n")
---

Signed-off-by: Adrian DC <radian.dc@gmail.com>
2024-10-05 14:01:50 -04:00
Anthony Sottile
003dfa55c9 update stages names to the non-deprecated names 2024-09-30 20:49:24 -04:00
Eric L Frederich
714f1e57b1
support more illegal Windows filenames
See comments in #1031
2024-04-16 14:43:15 -04:00
Eric L Frederich
865409743e Add check for illegal Widnows names
Fixes #589
2024-04-14 11:47:45 -04:00
Max R
cef973f323 Add deprecation messaging for fix-encoding-pragma 2024-04-06 14:09:51 -04:00
Lev Blit
03cb9e7007 add constraints file to requirements-txt-fixer files 2023-01-14 13:31:45 +02:00
Anthony Sottile
a9b6a7e7fa add forbid-submodules hook 2022-10-04 15:56:38 -04:00
Anthony Sottile
412564fa95 add --pytest-test-first convention 2022-06-07 09:10:42 -07:00
Anthony Sottile
d17fe994c6
set stages for check-added-large-files
looks like this was accidentally running on `commit-msg` hooks
2022-06-06 12:24:03 -04:00
Anthony Sottile
879055f991 update display name of name-tests-test 2022-01-06 16:33:52 -05:00
Iulian Onofrei
d7932b63a3 Fix inconsistent descriptions wording 2021-10-20 17:03:53 +03:00
Iulian Onofrei
8a1d0fcbaa Fix inconsistent descriptions punctuations 2021-10-20 17:03:53 +03:00
Iulian Onofrei
2006a4d81b Fix inconsistent descriptions positions 2021-10-20 17:02:31 +03:00
Dennis Roche
ccaa20da8d all lower-case as requested 2021-10-18 19:58:32 -04:00
Mikhail Khvoinitsky
10c5e4e166 forbid-new-submodules: fix triggering failure when only a submodule is committed (without any other file); support --from-ref and --to-ref; fixes #609 2021-08-13 21:32:08 +03:00
Anthony Sottile
11a996eec6
Merge pull request #597 from pre-commit/remove-deprecated
remove deprecated autopep8-wrapper, flake8, pyflakes
2021-05-11 13:16:53 -07:00
Anthony Sottile
1995abf556 remove deprecated autopep8-wrapper, flake8, pyflakes 2021-05-11 13:09:44 -07:00
Ville Skyttä
391ae30a64 Add check for executability of scripts with shebangs
Closes https://github.com/pre-commit/pre-commit-hooks/issues/543
2021-05-04 18:45:43 -07:00
Mikhail Khvoinitsky
1e87d59a2d New hook 'destroyed-symlinks' to detect symlinks which are changed to regular files with a content of a path which that symlink was pointing to; move zsplit to util 2020-11-18 11:45:05 -08:00
Jeremiah Gowdy
d18bd5b75f Add new byte-order-marker checker/fixer 2020-10-11 11:31:05 -07:00
Anthony Sottile
e6d9355bf1 Remove additional remnants of flake8 2020-05-14 16:16:09 -07:00
Anthony Sottile
b9cc9d7761 remove flake8 and suggest pycqa/flake8 2020-05-14 16:00:29 -07:00
Anthony Sottile
165a508965
Extend deprecation message to description
This will make it show up on https://pre-commit.com/hooks.html
2020-02-18 10:30:47 -08:00
Anthony Sottile
810048551e officially deprecate the flake8 hook 2020-02-04 15:59:37 -08:00
Semyon Maryasin
ae70f7e3c7 Add check-toml hook 2019-08-03 19:16:51 +01:00
Toby Fleming
841c47ebf7 Run check-byte-order-marker against all text types, not just Python files 2019-03-21 16:33:00 -07:00
Iulian Onofrei
93e3a4f3ee
Don't run check-executables-have-shebangs and trailing-whitespace-fixer hooks for the commit-msg stage 2019-02-02 10:38:39 +02:00
Anthony Sottile
2c29916456
Turn off pre-commit's automated multiprocessing for flake8
flake8 internally implements multiprocessing, disabling pre-commit's improves performance
2019-01-27 09:25:18 -08:00
Kevin James
1d705879fd
Update .pre-commit-hooks.yaml 2018-11-26 14:43:33 -08:00
Kevin James
4303229d8f
Update .pre-commit-hooks.yaml 2018-11-26 12:18:43 -08:00
Kevin James
3eca2d07a5
fix(metadata): deprecate autopep8-wrapper 2018-11-26 12:12:42 -08:00
Anthony Sottile
2f6ba1b88e Remove legacy hooks.yaml and pre-types config 2018-10-11 22:20:07 -07:00
Iulian Onofrei
5f6a443de2
Fix options ordering 2018-09-27 21:09:33 +03:00
Iulian Onofrei
68aa6e77e1
Don't run end-of-file-fixer hook for the commit-msg stage 2018-09-27 20:44:09 +03:00
Anthony Sottile
805530fe29 Update debug-statements description 2018-05-14 09:16:37 -07:00
Anthony Sottile
66eb9d3aec Don't pass filenames for no-commit-to-branch 2018-02-24 09:24:30 -08:00
Ben Webber
35996b7a25 Add check to enforce literal syntax for Python builtin types
This check requires authors to initialize empty or zero builtin types
using the literal syntax (e.g., `{}` instead of `dict()`).

Authors may ignore this requirement for certain builtins using the
`--ignore` option.

Authors may also forbid calling `dict()` with keyword arguments
(`dict(a=1, b=2)`) using the `--no-allow-dict-kwargs` flag.
2017-11-26 00:46:03 +00:00
Anthony Sottile
9db0a745f6 Add hook for ensuring vcs permalinks 2017-10-06 23:37:13 -07:00
Morgan Courbet
fc8a5b27e9 Add mixed-line-ending hook 2017-09-05 19:30:55 -07:00
Anthony Sottile
c5b56b6369 Use a better regex for name-tests-test 2017-07-30 17:52:31 -07:00
Anthony Sottile
3effa55911 More strict regex for name-tests-test 2017-07-21 09:37:41 -07:00
Chris Kuehl
13991f09d2 Add a checker for executables without shebangs 2017-07-02 21:14:25 -07:00
Anthony Sottile
abea6d293d Use 0.15.0 types 2017-07-02 20:57:10 -07:00
Anthony Sottile
5e4e5b3bcb Merge pull request #209 from pre-commit/0_15_0_forward_compatible
Make check-symlinks 0.15.0 compatible
2017-07-02 20:01:24 -07:00
Anthony Sottile
c4720434ba Make check-symlinks 0.15.0 compatible 2017-07-02 19:55:58 -07:00
Daniel Gallagher
d188f2ecf8 Merge branch 'master' into file_contents_sorter_hook 2017-06-25 09:39:21 -07:00
Daniel Gallagher
b6eff3d39e Add sort-simple-yaml hook (originally private hook from yelp_pre_commit_hooks) 2017-06-23 16:26:00 -07:00