File tree Expand file tree Collapse file tree 4 files changed +90
-2
lines changed Expand file tree Collapse file tree 4 files changed +90
-2
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/[email protected] '] 16+ - id : commitlint-travis
17+ stages : [manual]
18+ additional_dependencies :
['@commitlint/[email protected] '] 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,13 +55,27 @@ jobs:
5555 @commitlint/travis-cli
5656 - commitlint-travis
5757
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+
5872 # # Define the rest of the matrix based on Kitchen testing
5973 # Make sure the instances listed below match up with
6074 # the `platforms` defined in `kitchen.yml`
61- - env : INSTANCE=repositories-debian-10-master-py3
75+ # - env: INSTANCE=repositories-debian-10-master-py3
6276 # - env: INSTANCE=preferences-debian-10-master-py3
6377 # - env: INSTANCE=unattended-debian-10-master-py3
64- # - env: INSTANCE=debian-10-master-py3
78+ - env : INSTANCE=debian-10-master-py3
6579 - env : INSTANCE=repositories-ubuntu-1804-master-py3
6680 # - env: INSTANCE=preferences-ubuntu-1804-master-py3
6781 # - env: INSTANCE=unattended-ubuntu-1804-master-py3
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