File tree 4 files changed +88
-0
lines changed
4 files changed +88
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+ # vim: ft=yaml
3
+ ---
4
+ # See https://pre-commit.com for more information
5
+ # See https://pre-commit.com/hooks.html for more hooks
6
+ default_stages : [commit]
7
+ repos :
8
+ - repo : https://github.com/dafyddj/commitlint-pre-commit-hook
9
+ rev : v2.3.0
10
+ hooks :
11
+ - id : commitlint
12
+ name : Check commit message using commitlint
13
+ description : Lint commit message against @commitlint/config-conventional rules
14
+ stages : [commit-msg]
15
+ additional_dependencies : ['@commitlint/config-conventional@8.3.4']
16
+ - id : commitlint-travis
17
+ stages : [manual]
18
+ additional_dependencies : ['@commitlint/config-conventional@8.3.4']
19
+ always_run : true
20
+ - repo : https://github.com/adithyabsk/mirrors-rubocop
21
+ rev : v0.91.0
22
+ hooks :
23
+ - id : rubocop
24
+ name : Check Ruby files with rubocop
25
+ args : [--debug]
26
+ always_run : true
27
+ pass_filenames : false
28
+ - repo : https://github.com/jumanjihouse/pre-commit-hooks
29
+ rev : 2.1.3
30
+ hooks :
31
+ - id : shellcheck
32
+ name : Check shell scripts with shellcheck
33
+ files : ^.*\.(sh|bash|ksh)$
34
+ types : []
35
+ args : []
36
+ - repo : https://github.com/adrienverge/yamllint.git
37
+ rev : v1.23.0
38
+ hooks :
39
+ - id : yamllint
40
+ name : Check YAML syntax with yamllint
41
+ args : [--strict, '.']
42
+ always_run : true
43
+ pass_filenames : false
44
+ - repo : https://github.com/warpnet/salt-lint
45
+ rev : v0.3.0
46
+ hooks :
47
+ - id : salt-lint
48
+ name : Check Salt files using salt-lint
49
+ files : ^.*\.(sls|jinja|j2|tmpl|tst)$
50
+ # - repo: https://github.com/myint/rstcheck
51
+ # rev: 3f929574
52
+ # hooks:
53
+ # - id: rstcheck
54
+ # name: Check reST files using rstcheck
55
+ # args: [--report=warning]
Original file line number Diff line number Diff line change
1
+ [rstcheck]
2
+ report =error
3
+ ignore_language =rst
Original file line number Diff line number Diff line change 55
55
@commitlint/travis-cli
56
56
- commitlint-travis
57
57
58
+ # Run `pre-commit` linters in a single job
59
+ - language : ' python'
60
+ env : ' Lint_pre-commit'
61
+ name : ' Lint: pre-commit'
62
+ before_install : ' skip'
63
+ cache :
64
+ directories :
65
+ - $HOME/.cache/pre-commit
66
+ script :
67
+ # Install and run `pre-commit`
68
+ - pip install pre-commit==2.7.1
69
+ - pre-commit run --all-files --color always --verbose
70
+ - pre-commit run --color always --hook-stage manual --verbose commitlint-travis
71
+
58
72
# # Define the rest of the matrix based on Kitchen testing
59
73
# Make sure the instances listed below match up with
60
74
# the `platforms` defined in `kitchen.yml`
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+ set -o nounset # Treat unset variables as an error and immediately exit
3
+ set -o errexit # If a command fails exit the whole script
4
+
5
+ if [ " ${DEBUG:- false} " = " true" ]; then
6
+ set -x # Run the entire script in debug mode
7
+ fi
8
+
9
+ if ! command -v pre-commit > /dev/null 2>&1 ; then
10
+ echo " pre-commit not found: please install or check your PATH" >&2
11
+ echo " See https://pre-commit.com/#installation" >&2
12
+ exit 1
13
+ fi
14
+
15
+ pre-commit install --install-hooks
16
+ pre-commit install --hook-type commit-msg --install-hooks
You can’t perform that action at this time.
0 commit comments