]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: add yamlcheck
authorViktor Szakats <commit@vsz.me>
Thu, 22 Aug 2024 18:14:17 +0000 (20:14 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 23 Aug 2024 16:42:55 +0000 (18:42 +0200)
Uses `yamllint`.

Also:
- fix warning for existing YAML files:
  ```
  [truthy] truthy value should be one of [false, true]
  ```

Closes #14650

23 files changed:
.github/scripts/yamlcheck.sh [new file with mode: 0755]
.github/scripts/yamlcheck.yaml [new file with mode: 0644]
.github/workflows/appveyor-status.yml
.github/workflows/awslc.yml
.github/workflows/checkdocs.yml
.github/workflows/checksrc.yml
.github/workflows/codeql-analysis.yml
.github/workflows/configure-vs-cmake.yml
.github/workflows/curl-for-win.yml
.github/workflows/cygwin.yml
.github/workflows/distcheck.yml
.github/workflows/fuzz.yml
.github/workflows/hacktoberfest-accepted.yml
.github/workflows/http3-linux.yml
.github/workflows/label.yml
.github/workflows/linux-old.yml
.github/workflows/linux.yml
.github/workflows/linux32.yml
.github/workflows/macos.yml
.github/workflows/non-native.yml
.github/workflows/torture.yml
.github/workflows/windows.yml
.github/workflows/wolfssl.yml

diff --git a/.github/scripts/yamlcheck.sh b/.github/scripts/yamlcheck.sh
new file mode 100755 (executable)
index 0000000..2431c97
--- /dev/null
@@ -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')
diff --git a/.github/scripts/yamlcheck.yaml b/.github/scripts/yamlcheck.yaml
new file mode 100644 (file)
index 0000000..a6e1641
--- /dev/null
@@ -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
index df54422ff7a79ec3ac88b211ca36d6e93fae92fe..221db2d239d03c1007984d4865ca17f74360ef80 100644 (file)
@@ -4,7 +4,7 @@
 
 name: AppVeyor Status Report
 
-on:
+'on':
   status
 
 concurrency:
index 10b95dd9978d3d732b9eebf081da9a842c612d58..d1ffdc5edcf6598f91629109580ac86a451b7924 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Linux AWS-LC
 
-on:
+'on':
   push:
     branches:
       - master
index 60b8d1cee5793767c1514e6a8378a8e5765b58ea..607945d54e5aae7f0dde6ded131d31acda017cc5 100644 (file)
@@ -7,7 +7,7 @@
 
 name: Docs
 
-on:
+'on':
   push:
     branches:
       - master
index 5992af2fe653115a92bf02114690820a851c3aa7..b20a8b85855385958d986c344816b38b2a6df047 100644 (file)
@@ -6,7 +6,7 @@
 
 name: Source
 
-on:
+'on':
   push:
     branches:
       - master
@@ -84,6 +84,9 @@ jobs:
       - name: spacecheck
         run: .github/scripts/spacecheck.pl
 
+      - name: yamlcheck
+        run: .github/scripts/yamlcheck.sh
+
       - name: binarycheck
         run: .github/scripts/binarycheck.pl
 
index 7f8de202fb72e5960e934cbe4463a77d821decb5..da4e2cf208871d028dc44ec98d28eeda92173f86 100644 (file)
@@ -4,7 +4,7 @@
 
 name: CodeQL
 
-on:
+'on':
   push:
     branches:
       - master
index 299230e957f67d0b9afb7a80f8f81b4d0f4ec3c2..d8580b973a7d17112f160a9ffa7c02134f4b9dc2 100644 (file)
@@ -3,7 +3,7 @@
 # SPDX-License-Identifier: curl
 
 name: configure-vs-cmake
-on:
+'on':
   push:
     branches:
       - master
index 87927278c48c26c5108e41368fee19edae4f1c02..98320847771b19860c025680dd3456959d020554 100644 (file)
@@ -4,7 +4,7 @@
 ---
 name: curl-for-win
 
-on:
+'on':
   push:
     branches:
       - master
index 244c65de55d8362abfcd985a81c43f9cf4f91992..9e838133e5866b2caed6405807c9f41baac986b5 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Cygwin
 
-on:
+'on':
   push:
     branches:
       - master
index d8ea8a80efd02979d23fd727e5ba3505ef0eba17..3b2cb98cb00c82ddafb52c96bb7bb31a1fc8c677 100644 (file)
@@ -4,7 +4,7 @@
 
 name: dist
 
-on:
+'on':
   push:
     branches:
       - master
index 20774292b6285d856264f56a59a29e28f47f273e..29a63d1964020539b8e449a37f0ebc2864ddd012 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Fuzzer
 
-on:
+'on':
   push:
     branches:
       - master
index 02afb53deb6df433c13755560532ca76200a8734..5368bf6b948ab2dfb2216e9875cf6b35510e7b78 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Hacktoberfest
 
-on:
+'on':
   # this must not ever run on any other branch than master
   push:
     branches:
index 9baa7f8a364ff873ec0c4e708487d81f475aff08..d3134ddfb01c6d66b14407127c6e01ec79e099e6 100644 (file)
@@ -4,7 +4,7 @@
 
 name: http3-linux
 
-on:
+'on':
   push:
     branches:
       - master
index de93ae26d793df7d636aaf8fa15044dd0c190135..eb74b5c0ea7335ca867c85b68bf5c6386cef346a 100644 (file)
@@ -10,7 +10,7 @@
 # https://github.com/actions/labeler
 
 name: Labeler
-on: [pull_request_target]
+'on': [pull_request_target]
 
 jobs:
   label:
index 4f266b69a4d978d7906d74a021fe70c5ca3b41d1..c90ac4d10797f95c9d328564e73bf4c643395233 100644 (file)
@@ -18,7 +18,7 @@
 
 name: Old Linux
 
-on:
+'on':
   push:
     branches:
       - master
index 2e672a8de480b8800a21c4d0f754d68b7c557f07..79aee4b38bc7b7959fb432427ba33c48f88df070 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Linux
 
-on:
+'on':
   push:
     branches:
       - master
index eb7cb8ac87e2527dbae27e467091ff31bb029e34..c276bb1bbb19819bc8ad32232d2ac18be1160ad9 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Linux 32-bit
 
-on:
+'on':
   push:
     branches:
       - master
index 8cde2dae3d4135837f3ec7d64a6970d58e38e1d8..5b1317fbbc43112d788114e1a31877d90a0c7899 100644 (file)
@@ -4,7 +4,7 @@
 
 name: macOS
 
-on:
+'on':
   push:
     branches:
       - master
index 104e0acabe1d493fad0034fd4ebe29477e06e5e9..6985db739f7ea6f03b5f33752abaea66d70a9baf 100644 (file)
@@ -4,7 +4,7 @@
 
 name: non-native
 
-on:
+'on':
   push:
     branches:
       - master
index 10bd34ce9c550ecce441552daa1ac08ac1b5e260..4f39aa6dfed2b81ac6d4dcad9251a62f3379eac2 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Linux torture
 
-on:
+'on':
   push:
     branches:
       - master
index 0d8779d180c64476648e8ad6727f5fc712f968a7..f7d205ec29de711f88229ab445330feed696c27e 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Windows
 
-on:
+'on':
   push:
     branches:
       - master
index c4156497e28c0375b95328a59385d0241e36509e..ebf099aad3933725034ea6a9a3a303e0e9714184 100644 (file)
@@ -4,7 +4,7 @@
 
 name: Linux wolfSSL
 
-on:
+'on':
   push:
     branches:
       - master