File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -106,3 +106,21 @@ jobs:
106106 run : |
107107 sudo apt-get install shellcheck
108108 ./run-tests.sh --lint-shellcheck
109+
110+ lint-yamllint :
111+ runs-on : ubuntu-24.04
112+ steps :
113+ - name : Checkout
114+ uses : actions/checkout@v4
115+ with :
116+ fetch-depth : 0
117+
118+ - name : Setup Python
119+ uses : actions/setup-python@v5
120+ with :
121+ python-version : " 3.12"
122+
123+ - name : Lint YAML files
124+ run : |
125+ pip install yamllint
126+ ./run-tests.sh --lint-yamllint
Original file line number Diff line number Diff line change 1+ extends : default
2+ rules :
3+ comments :
4+ min-spaces-from-content : 1
5+ document-start : disable
6+ line-length : disable
7+ truthy : disable
Original file line number Diff line number Diff line change @@ -96,13 +96,18 @@ lint_shellcheck() {
9696 find . -name " *.sh" -exec shellcheck {} \+
9797}
9898
99+ lint_yamllint () {
100+ yamllint .
101+ }
102+
99103all () {
100104 docs_shell_completions
101105 format_go
102106 go_tests
103107 lint_commitlint
104108 lint_goaudit
105109 lint_shellcheck
110+ lint_yamllint
106111}
107112
108113help () {
@@ -116,6 +121,7 @@ help() {
116121 echo " --lint-commitlint Check linting of commit messages"
117122 echo " --lint-goaudit Check linting of Go code"
118123 echo " --lint-shellcheck Check linting of shell scripts"
124+ echo " --lint-yamllint Check linting of YAML files"
119125}
120126
121127if [ $# -eq 0 ]; then
@@ -133,5 +139,6 @@ case $arg in
133139--lint-commitlint) lint_commitlint " $@ " ;;
134140--lint-goaudit) lint_goaudit ;;
135141--lint-shellcheck) lint_shellcheck ;;
142+ --lint-yamllint) lint_yamllint ;;
136143* ) echo " [ERROR] Invalid argument '$arg '. Exiting." && help && exit 1 ;;
137144esac
You can’t perform that action at this time.
0 commit comments