pre-commit-ci[bot]
16d54fd3e5
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2025-12-12 11:20:26 +00:00
Sten Leinasaar
8f9d35b3b8
added custom secrets management
2025-12-12 13:17:44 +02:00
Anthony Sottile
a804ba5239
fix nested calls for check-builtin-literals
2025-10-16 09:30:42 -04:00
anthony sottile
3411068391
py310+
...
Committed via https://github.com/asottile/all-repos
2025-10-09 17:44:52 -04:00
Max R
5920aee766
Remove check-byte-order-marker and fix-encoding-pragma
2025-05-25 11:03:00 -04:00
Elliot Jordan
4c9457c08b
Fix grammar of check-shebang-scripts error
2024-12-18 19:58:24 -08:00
Luis Pérez
6883485395
Disallow --unique alongside --ignore-cases in file-contents-sorter
...
Closes #794 : using these flags at the same time results in undefined
behavior - the final ordering is not guaranteed as --unique breaks
sorting due to passing the contents through a set.
NOTE: I added a newline before and after the mutex group to be
consistent with other usages of mutex groups (e.g.,
check_builtin_literals.py) in this repo.
2024-10-26 15:04:34 -04:00
Anthony Sottile
a49f812a96
py39+
...
Committed via https://github.com/asottile/all-repos
2024-10-11 19:30:07 -04:00
pre-commit-ci[bot]
effeb7a743
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-07-29 22:00:04 +00:00
Alex Marvin
25cdd5457b
Continues processing JSONs even if hook fails ( fixes #1038 )
2024-04-20 13:15:14 -04:00
Anthony Sottile
b73acb198e
Merge pull request #850 from ericfrederich/fix-requirements-fixer
...
Stop pkg_resources from being added as well
2024-04-06 14:35:41 -04:00
Max R
cef973f323
Add deprecation messaging for fix-encoding-pragma
2024-04-06 14:09:51 -04:00
Eric L Frederich
eadcce2e03
Stop pkg_resources from being added as well
...
This package with an underscore instead of a dash seems to be
new behavior (at least on Ubuntu 20.04 with Python 3.8)
fixes #1030
2024-03-26 15:27:01 -04:00
Vincent Houlbrèque
0d6d0a79df
Remove duplicated packages
2024-02-25 12:15:29 -05:00
Anthony Sottile
f27ee318d2
don't rewrite string quotes inside f-strings
2023-10-07 13:50:33 -04:00
Miroslav Šedivý
2e4efef07e
Remove redundant int() conversion
2023-09-21 20:12:26 +02:00
Max R
8ef58bed01
Merge pull request #936 from szepeviktor/patch-1
2023-09-05 15:26:30 -04:00
Roel Adriaans
fdbaeb81fa
Fix blank lines
...
As stated in the documentation: `Note that this hook WILL remove blank lines`
Previously this hook would always add blank a blank line.
With this fix, if the file is empty, a newline will not be added, and multpline blanklines in a file will be removed.
Fixes #935
2023-08-05 22:56:46 +02:00
mwip
bc7973eb59
Add bpdb to debug_statements_hook
...
This patch adds the bpython debugger import `bpdb` to the
debug_statements_hook.
2023-08-02 15:47:15 +02:00
Viktor Szépe
268a93037b
Fix a typo in check_yaml
2023-07-23 05:28:40 +02:00
Anthony Sottile
e432efb74b
shlex.join is always available in 3.8+
2023-07-01 17:35:45 -04:00
Anthony Sottile
412564fa95
add --pytest-test-first convention
2022-06-07 09:10:42 -07:00
Daniël van Noord
fc88f3fa49
Use tomli and tomllib instead of toml
2022-05-31 10:48:00 -04:00
MDW
bd70bc119d
Add instruction to change executable mode on windows
2022-05-26 17:31:24 +02:00
Kurt von Laven
2cbabf90cc
Check Git core.fileMode rather than infer from OS.
...
There was already a guard preventing the check-executables-have-shebangs
hook from raising false positives on win32 by looking up the Git file
mode rather than relying on the file mode in the file system. Git already
automatically probes the file system for executable bit support. Leverage
Git's core.fileMode config variable to prevent false positives on all
file systems that don't track executable bits.
2022-04-28 11:23:36 -07:00
Anthony Sottile
b13ff9b868
adjust error outputs to be more standardized
2022-04-06 16:59:53 -04:00
Anthony Sottile
8f6152921e
drop python3.6 support
...
python 3.6 reached end of life on 2021-12-23
Committed via https://github.com/asottile/all-repos
2022-01-15 19:24:05 -05:00
Alex Martani
03a65ca357
Fix check-added-large-files --enforce-all to correctly consider all git-lfs files.
...
`git lfs status` only outputs status for files that are pending some git-lfs related operation.
For usage with --enforce-all, we need the list of all files that are tracked, which can be
achived by `git lfs ls-files`.
Fixes: https://github.com/pre-commit/pre-commit-hooks/issues/560
2021-12-20 23:04:50 -05:00
Pujit Mehrotra
16bc739ce7
Suggest usable call when exec files lack shebang on Windows
...
Resolves Issue #686
2021-12-07 15:53:54 -05:00
Anthony Sottile
39ab2ed85e
replace exit(main()) with raise SystemExit(main())
...
Committed via https://github.com/asottile/all-repos
2021-10-23 13:23:50 -04:00
Janosh Riebesell
05a5297dbb
fix typos
2021-10-23 13:11:40 -04:00
Anthony Sottile
81c6c559e0
remove unneeded executable bits
2021-10-18 20:00:49 -04:00
Ersin Yildirim
07af54024c
Adjust git dir when checking for merge in worktree
2021-10-15 18:23:43 -04:00
Luís Ferreira
1b4e30e9aa
detect_private_key: add OpenVPN shared-secret key block
...
'OpenVPN Static key V1' label is often used by OpenVPN for providing hardening
security with additional HMAC signatures to the SSL/TLS handshake packets. They
are shared secrets and should be kept private.
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-10-02 20:53:39 +01:00
Luís Ferreira
ccdf02dfd4
detect_private_key: add textual version of PKCS #8 encrypted private keys
...
As described by RFC7468 and RFC5958, keys that are encoded using the "ENCRYPTED
PRIVATE KEY" label are described as private key information and therefore can
contain secrets, even though encrypted.
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-10-02 20:53:33 +01: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
Guy Kisel
2468167371
remove unused os.path
2021-07-09 12:29:20 -07:00
Guy Kisel
8a4333fcff
optimize check_case_conflict.parents
2021-07-09 12:26:07 -07:00
Can Sarıgöl
41b29e8c8d
Added pdbr into debug statements
2021-06-15 09:28:11 +02: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
Ville Skyttä
9e7cd9f13a
Refactor check_executables_have_shebangs for git ls-files reuse
2021-05-04 18:45:42 -07:00
jack1142
4729918bc9
Disallow any branch name in checks_vcs_permalinks
2021-04-06 18:19:19 -07:00
Krystian Chmura
f681234a0e
check also directories in check_case_conflict
...
fix #70
2021-04-04 09:27:44 -07:00
jack1142
1de4fe6b42
Update pretty-format-json to write to stdout with utf-8 encoding
2021-03-15 17:48:24 -07:00
Nicholas Devenish
3abbd4785c
no-commit-to-branch: Default to both master and main
2021-03-04 15:59:25 +00:00
Aditya Khursale
fe37451719
Report duplicate keys in check_json
...
Raise ValueError and return 1 if json contains duplicate keys
2021-02-18 13:53:57 -08:00
Viacheslav Greshilov
28b2c8e431
requirements-txt-fixer now supports indents before comments
2021-01-17 21:15:05 +02:00
Ville Skyttä
dae0cbd2fa
check_executables_have_shebangs: avoid unneeded shebang reads on win32
2021-01-08 16:22:33 +02: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
Youngmin Koo
1f8151aeeb
Add --additional-github-domain to check-vcs-permalinks
2020-11-18 08:58:23 -08:00