GHA: minor tidy-ups

- 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
This commit is contained in:
Viktor Szakats 2025-07-13 03:28:19 +02:00
parent 99f0ebc508
commit 9bdd08b3b2
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 7 additions and 2 deletions

View 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

View file

@ -38,8 +38,13 @@
# 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