mirror of
https://github.com/curl/curl.git
synced 2026-05-01 01:57:50 +03:00
GHA: add yamlcheck
Uses `yamllint`. Also: - fix warning for existing YAML files: ``` [truthy] truthy value should be one of [false, true] ``` Closes #14650
This commit is contained in:
parent
5629bb7cf6
commit
f73f6bf9f8
23 changed files with 54 additions and 21 deletions
13
.github/scripts/yamlcheck.sh
vendored
Executable file
13
.github/scripts/yamlcheck.sh
vendored
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
|
||||
set -eu
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
yamllint \
|
||||
--format standard \
|
||||
--strict \
|
||||
--config-data "$(dirname "$0")/yamlcheck.yaml" \
|
||||
$(git ls-files '*.yaml' '*.yml')
|
||||
17
.github/scripts/yamlcheck.yaml
vendored
Normal file
17
.github/scripts/yamlcheck.yaml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Copyright (C) Viktor Szakats
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Docs: https://yamllint.readthedocs.io/en/stable/configuration.html
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
max: 500
|
||||
level: warning
|
||||
|
||||
braces: disable
|
||||
commas: disable
|
||||
comments: disable
|
||||
document-start: disable
|
||||
Loading…
Add table
Add a link
Reference in a new issue