Commit Graph

776 Commits

Author SHA1 Message Date
Anthony Sottile
017fa5c0b8 Merge pull request #2665 from pre-commit/move-parse-version
move parse_version to pre_commit.clientlib
2023-01-01 17:51:11 -05:00
Anthony Sottile
5425c754a0 move parse_version to pre_commit.clientlib 2023-01-01 17:17:00 -05:00
Anthony Sottile
0a0754e44a special rmtree is not needed for TemporaryDirectory in 3.8+ 2023-01-01 17:12:28 -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
d33df92add Merge pull request #2602 from pre-commit/mypy-modules-as-protocols
use modules as protocols
2022-12-27 13:04:48 -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
40e69ce8e3 use modules as protocols 2022-12-27 11:46:11 -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
Ruairidh MacLeod
e904628830 fix dotnet hooks with prefixes 2022-12-21 13:35:19 -05:00
Lorenz Walthert
52948f610c When R executable is an explicit path, we need to appene .exe on Windows 2022-12-12 13:21:55 -05:00
Anthony Sottile
b00c31cf9e use a newer version of ruby which builds cleanly 2022-12-12 12:22:39 -05:00
Anthony Sottile
b92fe01755 force the -p branch to run for language: python under test 2022-12-10 23:33:20 -05:00
Anthony Sottile
92c70766fd fix rust coverage on windows
it's a complete mystery why this isn't needed on other platforms, the branch is legitimately uncovered there
2022-12-06 17:36:57 -05:00
Anthony Sottile
0b45ecc8a4 remove python 2.x cross version tests 2022-12-06 17:36:57 -05:00
marsha
42102a1bfd Remove expected_returncode from CalledProcessError 2022-10-30 15:31:45 -05:00
marsha
84b38f7b89 Change cmd_output_bs retcode arg to a boolean check 2022-10-30 14:49:42 -05:00
marsha
e703982de4 Change Rust to install environment with cargo add over toml 2022-10-28 21:32:52 -05:00
Jan Holthuis
eb469c756d Rust as 1st class language 2022-10-10 20:05:36 -04:00
chrisRedwine
6d5de9feaf remove extraneous raw string literal in test 2022-09-26 17:53:14 -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
2405caa352 allow pre-commit run --files ... against unmerged files 2022-08-15 13:46:17 -04:00
Mark Korondi
587c6b97e7 respect aliases in SKIP when installing environments 2022-08-11 09:30:39 +02:00
Anthony Sottile
db51d3009f adjust relative --commit-msg-filename if in subdir 2022-07-12 14:08:57 -04:00
Anthony Sottile
ebce88c13d remove warnings checks
this wasn't all that useful -- and most of it was for checking python 2 things
2022-07-10 14:20:14 -04:00
Miro Hrončok
901e831313 Tests: Adjust traceback regexes to allow Python 3.11+ ^^^^^^^
Fixes https://github.com/pre-commit/pre-commit/issues/2451
2022-07-10 02:03:56 +02:00
Matt Whitaker
702ebf402c Expose prepare-commit-msg arguments as environment vars 2022-06-11 14:25:55 -04:00
Paul Gey
a54391e96f Force gem installation into GEM_HOME
When `--user-install` is set in the gemrc config file, `gem` ignores
`GEM_HOME`. `--no-user-install` prevents this behaviour.
2022-05-07 20:44:02 +02:00
Anthony Sottile
3929fe4a63 upgrade CI to ubuntu-latest / windows-latest 2022-04-24 19:10:09 -04:00
Anthony Sottile
777ffdd692 deprecate pre-commit-validate-{config,manifest} 2022-04-24 19:08:47 -04:00
Anthony Sottile
07554e9525 add additional info to healthy-after-install check 2022-04-16 16:46:28 -04:00
Wade Carpenter
feb0d34213 pre-push: fix stdin line splitting when <local ref> has whitespace
From the `pre-push.sample` file:

> Information about the commits which are being pushed is supplied as
> lines to the standard input in the form:
>
>   <local ref> <local sha1> <remote ref> <remote sha1>

When `<local ref>` is not simply a branch name, but a more general
ref (see git-rev-parse(1)), it could contain whitespace, and that
breaks the split() call that expected only 3 spaces in the line.

Changed to use `rsplit(maxsplit=3)` since only the <local ref> is
likely to have embedded whitespace.

Added a new test case for the same.
2022-04-14 14:27:46 -07:00
Anthony Sottile
b952c99898 fix tests for golang 1.18 2022-04-13 17:52:55 -04:00
Walluce Pinkham
9b3df4b90e Handling multiple outputs from dotnet pack 2022-04-07 13:16:56 -04:00
Anthony Sottile
1722448c3b fix python 2.7 repo: local hooks 2022-04-02 21:19:13 -04:00
Anthony Sottile
7602abc3cf Merge pull request #2322 from pre-commit/default-install-hook-types
implement default_install_hook_types
2022-04-02 15:36:59 -04:00
Anthony Sottile
e11163d010 Merge pull request #2301 from jeff-m-sullivan/rscript-path
use Rscript path relative to $R_HOME/bin/...
2022-04-02 15:30:52 -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
Daniel Schürmann
ba132f0200 Split get_git_dir() into get_git_dir() and get_git_common_dir()
This fixes the conflicted state check when using work trees. #1972
2022-04-02 15:07:22 -04:00
Jeff Sullivan
764a0db68e use Rscript path relative to $R_HOME/bin/...
Co-authored-by: Lorenz Walthert <lorenz.walthert@icloud.com>
2022-04-02 14:22:29 -04:00
Matt Layman
e8b46c1b16 Pick a tag if multiple tags exist on a SHA.
Fixes #2311
2022-03-31 10:37:51 -04:00
Anthony Sottile
2188c0fd2c include the configured value in the language_version / additional_dependencies error 2022-03-30 11:14:00 -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
54331dca6f get lua version from luarocks itself 2022-01-17 15:46:36 -05:00
Matt Layman
3f8be7400d Add naive and untested version of Lua language support. 2022-01-17 13:43:38 -05:00
Anthony Sottile
c05f58b776 add git version to error output 2022-01-16 07:20:12 -08:00
Uwe L. Korn
83aa65c429 Add mamba support to language: conda 2022-01-15 16:28:44 -05:00
Anthony Sottile
bba6cf4296 Revert "work around python/mypy#11852"
This reverts commit 83675fe768.
2022-01-10 15:35:33 -05:00
Anthony Sottile
d3b4f737b9 forbid overriding entry for meta hooks 2021-12-31 17:31:12 -08:00