]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: minor tidy-ups
authorViktor Szakats <commit@vsz.me>
Sun, 13 Jul 2025 01:28:19 +0000 (03:28 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 13 Jul 2025 09:52:08 +0000 (11:52 +0200)
- GHA/checksrc: make a step name more accurate.
- cmakelint.sh: make sure to run from project root.
  To make it easier to run locally.
- cmakelint.sh: use `set -eu`.

Closes #17915

.github/workflows/checksrc.yml
scripts/cmakelint.sh

index 87087fe8e74d3e0973af18e6c89b487109bd1e63..dc93c19de71013546f96f1ddd074345f3bddaa2d 100644 (file)
@@ -133,7 +133,7 @@ jobs:
           eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
           zizmor --pedantic .github/workflows/*.yml
 
-      - name: 'shellcheck GHA'
+      - name: 'shellcheck CI'
         run: |
           eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
           shellcheck --version
index 5c5fc7040f1ce5a52ba746edd9903f10596303f3..788f0873055b6bcbd575a53cd6f33d0d15629626 100755 (executable)
 # If such a file is ever added, then this can be portably fixed by switching to
 # "xargs -I{}" and appending {} to the end of the xargs arguments (which will
 # call cmakelint once per file) or by using the GNU extension "xargs -d'\n'".
+
+set -eu
+
+cd "$(dirname "$0")"/..
+
 {
-  if [ -n "$1" ]; then
+  if [ -n "${1:-}" ]; then
     for A in "$@"; do printf "%s\n" "$A"; done
   elif git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
     git ls-files