forked from oxsecurity/megalinter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-hooks.yaml
57 lines (56 loc) · 2.37 KB
/
.pre-commit-hooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
- id: megalinter-incremental
name: Run MegaLinter (skipping linters that run in project mode)
entry: npx --
language: system
require_serial: true
args:
- mega-linter-runner
- --container-name "megalinter-$(basename "$PWD")"
- --remove-container
- --fix
- --env
- "'APPLY_FIXES=all'"
- --env
- "'CLEAR_REPORT_FOLDER=true'"
- --env
- "'LOG_LEVEL=warning'"
- --filesonly
description: >
See https://oxsecurity.github.io/megalinter/latest/mega-linter-runner/#usage
and https://oxsecurity.github.io/megalinter/latest/configuration/ if you
wish to override the default arguments. mega-linter-runner is specified as
an argument so that you may override the version (e.g.,
mega-linter-runner@vx.y.z). Depends on npx, which ships with npm 7+, and
Docker. Runs very slowly when the pertinent Docker image isn't already
cached (c.f., https://github.com/marketplace/actions/docker-cache/). If you
encounter permission errors, try running Docker in rootless mode (c.f.,
https://github.com/marketplace/actions/rootless-docker/). Linter results are
logged to the megalinter-reports directory, so list it in your .gitignore.
Skip linters that run in project mode since they don't run incrementally.
- id: megalinter-full
name: Run MegaLinter
entry: npx --
language: system
require_serial: true
args:
- mega-linter-runner
- --container-name "megalinter-all-$(basename "$PWD")"
- --remove-container
- --fix
- --env
- "'APPLY_FIXES=all'"
- --env
- "'CLEAR_REPORT_FOLDER=true'"
- --env
- "'LOG_LEVEL=warning'"
description: >
See https://oxsecurity.github.io/megalinter/latest/mega-linter-runner/#usage
and https://oxsecurity.github.io/megalinter/latest/configuration/ if you
wish to override the default arguments. mega-linter-runner is specified as
an argument so that you may override the version (e.g.,
mega-linter-runner@vx.y.z). Depends on npx, which ships with npm 7+, and
Docker. Runs very slowly when the pertinent Docker image isn't already
cached (c.f., https://github.com/marketplace/actions/docker-cache/). If you
encounter permission errors, try running Docker in rootless mode (c.f.,
https://github.com/marketplace/actions/rootless-docker/). Linter results are
logged to the megalinter-reports directory, so list it in your .gitignore.