File tree Expand file tree Collapse file tree 2 files changed +27
-34
lines changed Expand file tree Collapse file tree 2 files changed +27
-34
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,33 @@ repos:
4545 hooks :
4646 - id : yamllint
4747 name : Check YAML syntax with yamllint
48- args : [--strict, '.']
49- always_run : true
50- pass_filenames : false
48+ args : [--strict]
49+ types : [file]
50+ # Files to include
51+ # 1. Obvious YAML files
52+ # 2. `pillar.example` and similar files
53+ # 3. SLS files under directory `test/` which are pillar files
54+ # Files to exclude
55+ # 1. SLS files under directory `test/` which are state files
56+ # 2. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
57+ # 3. YAML files heavily reliant on Jinja
58+ files : |
59+ (?x)^(
60+ .*\.yaml|
61+ .*\.yml|
62+ \.salt-lint|
63+ \.yamllint|
64+ .*\.example|
65+ test/.*\.sls
66+ )$
67+ exclude : |
68+ (?x)^(
69+ kitchen.vagrant.yml|
70+ test/.*/states/.*\.sls|
71+ salt/osfamilymap.yaml|
72+ salt/osmap.yaml|
73+ salt/osfingermap.yaml
74+ )$
5175 - repo : https://github.com/warpnet/salt-lint
5276 rev : v0.9.2
5377 hooks :
Original file line number Diff line number Diff line change 44# Extend the `default` configuration provided by `yamllint`
55extends : ' default'
66
7- # Files to ignore completely
8- # 1. All YAML files under directory `.bundle/`, introduced if gems are installed locally
9- # 2. All YAML files under directory `.cache/`, introduced during the CI run
10- # 3. All YAML files under directory `.git/`
11- # 4. All YAML files under directory `node_modules/`, introduced during the CI run
12- # 5. Any SLS files under directory `test/`, which are actually state files
13- # 6. Any YAML files under directory `.kitchen/`, introduced during local testing
14- # 7. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax
15- # 8. All YAML files heavily reliant on Jinja; these can be tackled in a subsequent PR
16- ignore : |
17- .bundle/
18- .cache/
19- .git/
20- node_modules/
21- test/**/states/**/*.sls
22- .kitchen/
23- kitchen.vagrant.yml
24- salt/osfamilymap.yaml
25- salt/osmap.yaml
26- salt/osfingermap.yaml
27-
28- yaml-files :
29- # Default settings
30- - ' *.yaml'
31- - ' *.yml'
32- - .salt-lint
33- - .yamllint
34- # SaltStack Formulas additional settings
35- - ' *.example'
36- - test/**/*.sls
37-
387rules :
398 empty-values :
409 forbid-in-block-mappings : true
You can’t perform that action at this time.
0 commit comments