File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 1
1
- id : kube-linter
2
2
name : KubeLinter
3
3
description : This hook installs (using Go) and runs the KubeLinter utility to lint Helm charts and Kubernetes YAML files.
4
- entry : kube-linter
4
+ entry : kube-linter lint
5
5
language : golang
6
6
types : [yaml]
7
7
8
8
- id : kube-linter-system
9
9
name : KubeLinter System
10
10
description : This hook runs the KubeLinter utility that exists already on the system to lint Helm charts and Kubernetes YAML files.
11
- entry : kube-linter
11
+ entry : kube-linter lint
12
12
language : system
13
13
types : [yaml]
14
14
17
17
description : This hook runs kube-linter using the project's official docker image
18
18
language : docker_image
19
19
types : [yaml]
20
- entry : stackrox/kube-linter:0.2.6
20
+ entry : stackrox/kube-linter:0.2.6 lint
Original file line number Diff line number Diff line change @@ -37,20 +37,15 @@ kube-linter lint /path/to/directory/containing/Chart.yaml-file/
37
37
38
38
If you are using the [ pre-commit framework] ( https://pre-commit.com/ ) for
39
39
managing Git pre-commit hooks, you can install and use KubeLinter as a
40
- pre-commit hook. To do this:
41
-
42
- 1 . Download the [ ` .pre-commit-hooks.yaml ` ] ( https://raw.githubusercontent.com/stackrox/kube-linter/main/.pre-commit-hooks.yaml )
43
- file in the Git repository in which you want to install the KubeLinter
44
- pre-commit hooks:
45
- ``` bash
46
- curl -O https://raw.githubusercontent.com/stackrox/kube-linter/main/.pre-commit-hooks.yaml
47
- ```
48
- 1 . Run the ` pre-commit install ` command:
49
- ``` bash
50
- pre-commit install
51
- ```
52
- 1 . After installation, the KubeLinter pre-commit hooks run whenever you run the
53
- ` git commit ` command.
40
+ pre-commit hook. To do this, add the following to your ` .pre-commit-config.yaml ` :
41
+
42
+ ``` yaml
43
+ - repo : https://github.com/stackrox/kube-linter
44
+ rev : 0.6.0 # kube-linter version
45
+ hooks :
46
+ # You can change this to kube-linter-system or kube-linter-docker
47
+ - id : kube-linter
48
+ ` ` `
54
49
55
50
The [` .pre-commit-hooks.yaml`](https://raw.githubusercontent.com/stackrox/kube-linter/main/.pre-commit-hooks.yaml)
56
51
includes the following pre-commit hooks :
You can’t perform that action at this time.
0 commit comments