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
Lorenz
788aec156f
local r hooks should not get prefix for path
2021-05-05 18:15:56 -07:00
Anthony Sottile
c082292bb8
Merge pull request #1841 from lorenzwalthert/renv-activate2
...
Avoid warnings with R hooks when renv version don't match
2021-05-04 19:27:44 -07:00
Lorenz
b8fff8c508
Avoid warnings with R hooks when renv version don't match
2021-05-04 18:56:43 -07:00
Lorenz
a19a59652f
Use more common package definition
2021-05-03 18:08:22 +02: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
Lorenz
cf57e35e37
install package from prefix_dir, not env_dir (which yields empty pkg)
2021-03-09 16:44:36 -08:00
Lorenz
f1502119a2
add support for R via renv
2021-03-07 13:58:14 -08:00
Paul Fischer
34e0ff3497
added recursive repository support for golang
2021-02-06 12:52:41 -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
a3e3b3d8aa
fix for rbenv used outside of pre-commit and language_version: default
2020-11-17 11:58:46 -08:00
Ruairidh MacLeod
aa8023407e
fix dotnet build cleanup
2020-11-03 08:53:17 -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
Joseph Moniz
70ab1c3b6f
add coursier (jvm) as a language
2020-10-27 09:21:54 -07:00
Marco Gorelli
a0658c06bf
add --negate flag to pygrep
2020-10-17 18:50:40 +01:00
Anthony Sottile
3584b99caa
simplify docker run
2020-10-10 18:09:51 -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
365f896c36
fix a few spelling errors
...
found via `pre-commit try-repo https://github.com/codespell-project/codespell --all-files`
2020-09-20 19:21:24 -07:00
Anthony Sottile
3e2b9dc91a
Merge pull request #1603 from pre-commit/no_format_executable
...
Fix ruby hooks when --format-executable is in gemrc
2020-09-18 09:37:41 -07:00
Anthony Sottile
13eed4ac5b
Fix ruby hooks when --format-executable is in gemrc
...
I used this gemrc to break things (default on opensuse):
```yaml
---
:benchmark: false
:install: --format-executable --no-user-install
install: --format-executable --no-user-install
:backtrace: true
:update_sources: true
:format_executable: true
:verbose: true
:update: --format-executable --no-user-install
update: --format-executable --no-user-install
:bulk_threshold: 1000
:sources:
- https://rubygems.org
```
2020-09-18 09:13:19 -07:00
Anthony Sottile
4888644990
remove hardcoded python location
2020-09-15 12:04:25 -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
6ec47ea736
fix node hooks when NPM_CONFIG_USERCONFIG is set
2020-06-19 13:58:14 -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
0781dac78f
avoid a UnicodeError on windows with non-charmap characters
2020-05-27 13:14:29 -07:00
Thierry Deo
b44461da33
Unset GEM_PATH for ruby hooks
2020-05-10 12:12:15 -07:00
Anthony Sottile
f455312944
Merge pull request #1431 from pre-commit/better_healthy
...
Improve python healthy() and eliminate python_venv
2020-05-04 10:52:59 -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
3b728fdb76
yay french strings
2020-05-02 11:37:31 -07:00
Anthony Sottile
e492a5578c
disable pip version check in python hooks
2020-04-29 12:11:34 -07:00
Anthony Sottile
522e82b7b7
Allow pip to be upgradable on windows
2020-04-17 07:41:11 -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
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