Daniel Bast
7c81f11d63
Add freeze config option for autoupdate command
...
This commit adds a new 'freeze' option to the CONFIG_SCHEMA, allowing users
to set 'freeze: true' in their pre-commit configuration file.
The intend are two effects, when setting `freeze: True`:
* Enables freeze automatically when running `pre-commit autoupdate` (no
need then anymore to specify --freeze).
* Enables https://pre-commit.ci/ to freeze hooks as part of update PRs.
2025-03-19 09:10:40 +01:00
Anthony Sottile
d31722386e
add warning for deprecates stages for remote repos on init
2024-09-30 20:41:50 -04:00
Anthony Sottile
33e020f315
add warning for deprecated stages values in default_stages
2024-09-30 19:22:14 -04:00
Anthony Sottile
7441a62eb1
add warning for deprecated stages names
2024-09-30 18:41:13 -04:00
Anthony Sottile
fa08d1d637
also apply sensible regex warning for repo: meta
2024-09-30 18:09:04 -04:00
Anthony Sottile
047439abff
attempt minimum_pre_commit_version first when parsing configs
2023-12-09 15:34:16 -05:00
Anthony Sottile
7f15dc75ee
python3.9+
2023-10-28 14:20:37 -04:00
Marcelo Galigniana
f39154f69f
Add pre-rebase hook support
2023-03-11 15:17:42 -05:00
Anthony Sottile
e3e17a1617
make --hook-type and stages match
2023-03-11 14:26:14 -05:00
Anthony Sottile
d3883ce7f7
move languages.all and languages.helpers out of languages
2023-02-20 18:03:45 -05:00
Anthony Sottile
8529a0c1d3
add pre_commit.yaml module
2023-01-02 18:42:34 -05:00
Anthony Sottile
5425c754a0
move parse_version to pre_commit.clientlib
2023-01-01 17:17:00 -05:00
Anthony Sottile
848a73ed40
Merge pull request #2658 from pre-commit/remove-pre-commit-validate
...
remove pre-commit-validate-config and pre-commit-validate-manifest
2022-12-27 13:53:10 -05:00
Anthony Sottile
4a50859936
remove pre-commit-validate-config and pre-commit-validate-manifest
2022-12-27 13:05:30 -05:00
Anthony Sottile
def3fa3929
Merge pull request #2657 from pre-commit/remove-sha-support
...
remove support for sha to specify rev
2022-12-27 12:13:26 -05:00
Anthony Sottile
ff3150d58a
remove support for sha to specify rev
2022-12-27 11:29:00 -05:00
Anthony Sottile
0024484f5b
remove support for top-level list format
2022-12-27 11:15:45 -05:00
chrisRedwine
a95f488e71
extend warning if globs are used instead of regex to local hooks
2022-09-25 11:56:04 -05:00
Anthony Sottile
777ffdd692
deprecate pre-commit-validate-{config,manifest}
2022-04-24 19:08:47 -04:00
Anthony Sottile
fd0177ae3a
implement default_install_hook_types
...
this implements a configurable fallback for the default value of `pre-commit install`
2022-04-02 15:11:31 -04:00
Anthony Sottile
04de6a2e57
drop python 3.6 support
...
python 3.6 reached end of life on 2021-12-23
2022-01-18 18:44:20 -05:00
Anthony Sottile
d3b4f737b9
forbid overriding entry for meta hooks
2021-12-31 17:31:12 -08:00
Tony Rintala
b5088ceca6
fix: regex lists to regex tuples
2021-12-05 01:35:43 +02:00
Tony Rintala
d4ffa5befb
fix: Add missing warning for regular expression with [\\/]
...
test: Test case parameters for said regular expression
refactor: For-loop for regex warnings instead of multiple if statements
resolves #2151
2021-12-04 22:51:04 +02:00
Stojan Nedic
63ae399db0
Add fail_fast support per-hook
2021-10-22 19:16:30 -04:00
Radek SPRTA
cef9c4af03
Add warning for regular expression with [\/] ( #2043 )
2021-09-22 19:07:38 -04:00
Anthony Sottile
f963bf6f9a
make repo: meta only apply to top level configuration
2021-08-28 13:39:55 -04:00
Jam M. Hernandez Quiceno
3d31858ee3
Instruct users how to prevent a mutable rev in repo warning.
2021-02-23 17:59:50 -08:00
Paul Fischer
b1a9209f9f
extended warning if globs are used instead of regex to top level
2021-01-01 23:57:24 +01:00
Paul Fischer
1e4de986a8
added warning if mutable rev is used
2020-12-18 12:20:21 -08:00
Anthony Sottile
38a4a0aa3b
allow configuration for pre-commit.ci
2020-12-16 20:21:33 -08:00
Anthony Sottile
89ab609732
fix the default value for types_or
2020-11-25 18:21:37 -08:00
Paul Fischer
610716d3d1
added warning if globs are used instead of regex
2020-11-22 18:53:48 -08:00
Marco Gorelli
62f668fc3f
add types_or
2020-11-02 17:25:10 +00:00
Anthony Sottile
91530f1005
check cygwin mismatch earlier
2020-09-20 10:42:11 -07:00
Anthony Sottile
68510596d3
warn on old list-style configuration
2020-07-25 13:04:54 -07:00
Anthony Sottile
a64fa6d478
Replace aspy.yaml with sort_keys=False
2020-01-31 17:18:59 -08:00
Anthony Sottile
df40e862f4
More miscellaneous cleanup
2020-01-13 11:47:34 -08:00
Anthony Sottile
9000e9dd41
Some manual .format() -> f-strings
2020-01-12 13:39:53 -08:00
Anthony Sottile
327ed924a3
Add types to pre-commit
2020-01-12 10:15:01 -08:00
Anthony Sottile
30c1e8289f
upgrade hooks, pyupgrade pre-commit
2020-01-12 09:27:04 -08:00
Anthony Sottile
8a3c740f9e
Implement pre-commit autoupdate --freeze
2019-12-28 13:07:39 -08:00
Anthony Sottile
6af0e33eed
Add top-level files key for inclusion
2019-12-23 12:04:05 -08:00
Anthony Sottile
625750eeef
fixes for cfgv>=2
2019-05-27 13:37:49 -07:00
Yoav Caspi
7a998a091e
improve function name
2019-05-12 23:29:42 +03:00
Yoav Caspi
ba7760b705
Add a test to validate that cfgv.WarnAdditionalKeys working as expected in the relevant config schemas
2019-05-12 15:09:15 +03:00
Yoav Caspi
217d31ec1c
Add a check and test to the real top level and improve the warning message
2019-05-11 22:57:52 +03:00
Yoav Caspi
fd9d9d276b
Add warning to additional keys in config
2019-05-11 20:59:34 +03:00
Anthony Sottile
c78b6967cd
Add top level minimum_pre_commit_version
2019-03-21 18:29:17 -07:00
Anthony Sottile
bd65d8947f
Implement default_stages
2019-01-06 10:32:58 -08:00