Commit Graph

205 Commits

Author SHA1 Message Date
Anthony Sottile
282527ef16 Merge pull request #1388 from pre-commit/node_default_system
Default to `language_version: system` if node and npm are installed
2020-04-09 16:48:18 -07:00
Anthony Sottile
0f528544b5 Default to language_version: system if node and npm are installed 2020-04-07 20:31:42 -07:00
KYLE ZHU
23d5b78fdb Don't use --user when running docker on windows 2020-03-19 21:55:16 -07:00
Anthony Sottile
7a49309035 mark a python environment as unhealthy if python goes missing 2020-03-12 09:40:56 -07:00
Anthony Sottile
67c1beb322 Use covdefaults to handle coveragerc 2020-02-29 14:25:19 -08:00
Anthony Sottile
fa8d022813 Remove unnecessary forward annotations 2020-02-07 08:32:39 -08:00
Anthony Sottile
44f5753bd8 shlex-quote install path to fix windows 2020-02-03 10:39:08 -08:00
Ville Skyttä
bb29630d57 First cut at Perl hook support 2020-01-30 09:19:58 +02:00
Anthony Sottile
9e4dc7f349 Fix pre-commit in python 3.6.0-3.6.1 2020-01-29 17:40:16 -08:00
Anthony Sottile
95b8d71bd9 Move most of the actual hook script into pre-commit hook-impl 2020-01-21 16:41:22 -08:00
Anthony Sottile
755b8000f6 move Hook data type to a separate file 2020-01-15 14:20:51 -08:00
Anthony Sottile
df40e862f4 More miscellaneous cleanup 2020-01-13 11:47:34 -08:00
Anthony Sottile
5706b9149c deep listdir works in python3 on windows 2020-01-12 13:39:53 -08:00
Anthony Sottile
67c2dcd90d Remove pre_commit.five 2020-01-12 13:39:53 -08:00
Anthony Sottile
5e52a657df Remove unused ruby activate script 2020-01-12 13:39:53 -08:00
Anthony Sottile
5d767bbc49 Replace match.group(n) with match[n] 2020-01-12 13:39:53 -08:00
Anthony Sottile
9000e9dd41 Some manual .format() -> f-strings 2020-01-12 13:39:53 -08:00
Anthony Sottile
aefbe71765 Clean up calls to .encode() / .decode() 2020-01-12 10:46:33 -08:00
Anthony Sottile
4eea90c26c leverage mypy to check language implementations 2020-01-12 10:15:02 -08:00
Anthony Sottile
327ed924a3 Add types to pre-commit 2020-01-12 10:15:01 -08:00
Anthony Sottile
fa536a8693 mypy passes with check_untyped_defs 2020-01-12 09:27:04 -08:00
Anthony Sottile
30c1e8289f upgrade hooks, pyupgrade pre-commit 2020-01-12 09:27:04 -08:00
Anthony Sottile
97e3371046 Remove deprecated pcre language 2020-01-05 13:58:44 -08:00
Uwe L. Korn
4ff23b4eab Support for conda as a language 2019-12-20 18:43:59 -08:00
Ryan Rhee
addc7045ba grammar 2019-11-01 11:33:04 -04:00
Anthony Sottile
bfcee8ec9f Fix python.healthy() check with stdlib module clashes 2019-10-22 13:23:57 -07:00
Anthony Sottile
7c3404ef1f show color in hook outputs when attached to a tty 2019-10-12 23:17:36 -07:00
Anthony Sottile
38766816ac Fix fail type signature 2019-10-12 21:29:15 -07:00
Anthony Sottile
f612aeb22b Split out cmd_output_b 2019-10-06 15:16:47 -07:00
Anthony Sottile
8537e7c94e Simplify if statement slightly 2019-08-27 10:35:40 -07:00
Henry Tang
b0c7ae4d29 Fix NODE_PATH on win32 2019-08-28 00:03:04 +08:00
Ville Skyttä
562276098c Address more @asottile's review comments 2019-08-15 18:54:08 +03:00
Ville Skyttä
38da98d2d6 Address @asottile's review comments 2019-08-15 18:43:31 +03:00
Ville Skyttä
fa2e154b41 Stabilize python default version lookup
For example, for sys.executable:
    /usr/bin/python3 -> python3.7
...the default lookup may return either python3 or python3.7. Make the
order deterministic by iterating over tuple, not set, of candidates.
2019-08-15 10:06:31 +03:00
zimbatm
cbbfcd20b4 rust language: use the new cargo install command
cargo install now requires an additional `--path <TARGET>` argument.
2019-08-11 13:36:13 -07:00
Edgar Geier
d4a9ff4d1f Simplify docker user fallback implementation and test 2019-07-25 11:22:59 +02:00
Edgar Geier
b43b6a61ab Add docker uid and gid fallback tests 2019-07-23 15:14:06 +02:00
Edgar Geier
b7ce5db782 Use fallback uid and gid if os.getuid() and os.getgid() are unavailable 2019-07-23 12:38:09 +02:00
Anthony Sottile
9bdce088c8 Use sys.executable if it matches on posix as well 2019-06-17 07:54:38 -07:00
Anthony Sottile
d74ee6d743 Don't attempt to decode the healthy response 2019-05-07 09:38:17 -07:00
Anthony Sottile
9c6edab726 azure pipelines [skip travis] [skip appveyor] 2019-04-28 21:39:06 -07:00
Anthony Sottile
d71a75fea2 Run npm install before npm install -g 2019-03-14 18:31:57 -07:00
Anthony Sottile
3cb35e8679 Revert "Merge pull request #949 from asottile/npm_install_git"
This reverts commit a4c1a701bc, reversing
changes made to 889124b5ca.
2019-03-14 18:20:30 -07:00
Anthony Sottile
6088b1f995 3 slashes works around an npm bug
https://npm.community/t/npm-install-g-git-file-c-path-to-repository-does-not-work-on-windows/5453
2019-02-17 12:17:46 -08:00
Anthony Sottile
136834038d Use npm install git+file:// instead of npm install . 2019-02-17 10:14:21 -08:00
Andrew S. Brown
1eed1b51b8 Address PR feedback 2019-01-27 17:55:11 -08:00
Andrew S. Brown
fe5390c068 Ensure that GOBIN is not set when installing a golang hook
If GOBIN is set, it will be used as the install path instead of the first item
from GOPATH followed by "/bin".  If it is used, commands will not be isolated
between different repos.
2019-01-27 13:34:47 -08:00
Anthony Sottile
32d65236bf Use sys.executable if it matches the requested version 2019-01-10 06:48:49 -08:00
Anthony Sottile
d3b5a41830 Implement default_language_version 2019-01-05 13:15:23 -08:00
Anthony Sottile
4f9d0397b5 Add more 'no cover windows' comments 2018-12-31 14:06:10 -08:00