Anthony Sottile
f8e21cb78b
add support for dart as a hook language
2021-08-29 08:57:56 -07:00
Anthony Sottile
5d1cac64c1
ignore self-container when in docker-in-docker
2021-08-03 13:08:07 -07:00
Adar Nimrod
3e1020945e
A more reliable way to get the container id.
...
The hostname is not always the container id. Get the container id from
/proc/1/cgroup. Fixes #1918 .
2021-07-03 10:43:11 -07:00
Anthony Sottile
3922263f8c
Use more inclusive language
...
Committed via https://github.com/asottile/all-repos
2021-05-14 19:11:05 -07:00
Lorenz
788aec156f
local r hooks should not get prefix for path
2021-05-05 18:15:56 -07:00
Oleg Kainov
6d5d386c9f
fix: fix path mounting when running in Docker
...
Currently pre-commit mounts the current directory to /src and uses
current directory name as mount base.
However this does not work when pre-commit is run inside the container
on some mounted path already, because mount points are relative to the
host, not to the container.
Fixes #1387
2021-04-28 19:21:34 -07:00
Anthony Sottile
d5eda977ce
fix archive permissions for ruby tar.gz roots
2021-04-06 07:55:32 -07:00
Lorenz
f1502119a2
add support for R via renv
2021-03-07 13:58:14 -08:00
Anthony Sottile
7486dee082
fix for base executable with non-ascii characters on windows
2020-11-25 12:44:48 -08:00
Anthony Sottile
e05ac1e91f
don't call ruby install for language_version = default
2020-10-29 19:45:06 -07:00
Anthony Sottile
62b8d0ed82
allow default language_version of system when homedir is /
2020-10-28 22:56:10 -07:00
Anthony Sottile
7f9f66e542
don't use system for ruby/node if it is a shim exe
2020-10-28 16:52:55 -07:00
Anthony Sottile
29f3e67655
improve node install by using npm pack
2020-10-28 15:13:53 -07:00
Marco Gorelli
a0658c06bf
add --negate flag to pygrep
2020-10-17 18:50:40 +01:00
Marco Gorelli
2fc676709d
Remove unnecessary fixtures in signatures from pygrep tests
2020-10-16 13:11:18 -07:00
Ruairidh MacLeod
003e4c21e0
add initial dotnet support
2020-09-27 15:04:35 -07:00
Anthony Sottile
58a190fd69
don't pass through -p if using the default version
2020-09-23 17:44:18 -07:00
Anthony Sottile
b149c7a344
fix for node healthy() when system executable moves
2020-09-07 13:23:02 -07:00
Anthony Sottile
b63b37ac36
fix cache of invalidated unhealthy environment version info
2020-08-23 10:17:24 -07:00
Ruairidh MacLeod
eb8b48aeb4
remove docker_is_running check from source
...
Moved to testing.util so it can be used for the skipif_cant_run_docker
test hooks.
2020-08-22 17:33:32 -07:00
Anthony Sottile
e1e6a32c51
skip rbenv if ruby and gem are installed with default language_version
2020-06-15 13:50:47 -07:00
Anthony Sottile
e120828042
use the shuffle method of Random instead
2020-05-31 12:42:17 -07:00
Anthony Sottile
3d50b3736a
Improve python healthy() and eliminate python_venv
...
- the `healthy()` check now requires virtualenv 20.x's metadata
- `python_venv` is obsolete now that `virtualenv` generates the same structure
and `virtualenv` is more portable
2020-05-03 21:55:48 -07:00
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
df40e862f4
More miscellaneous cleanup
2020-01-13 11:47:34 -08:00
Anthony Sottile
5e52a657df
Remove unused ruby activate script
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
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
ab19b94811
some manual py2 cleanups
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
b90412742e
A few cleanups for CalledProcessError to hopefully make it more readable
2019-12-23 17:46:48 -08:00
Anthony Sottile
f6b0c135ce
Create an actual environment for python healthy() types test
2019-12-06 13:31:08 -08: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
f612aeb22b
Split out cmd_output_b
2019-10-06 15:16:47 -07:00
Ville Skyttä
f84b19748d
Patch the correct find_executable
2019-08-15 19:28:07 +03: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ä
c377830898
Mock find_executable for find_by_sys_executable test
2019-08-15 18:34:25 +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
Edgar Geier
d4a9ff4d1f
Simplify docker user fallback implementation and test
2019-07-25 11:22:59 +02:00
Edgar Geier
a21a4f46c7
Fix missing create=True attribute in docker tests
2019-07-23 15:35:19 +02:00
Edgar Geier
b43b6a61ab
Add docker uid and gid fallback tests
2019-07-23 15:14:06 +02:00
Anthony Sottile
dc28922ccb
Run pre-commit autoupdate
...
Committed via https://github.com/asottile/all-repos
2019-03-21 21:09:33 -07:00