Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/validate-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ jobs:
- name: Check EditorConfig step
run: docker run --rm --pull=always -v "$PWD":/check --workdir /check mstruebing/editorconfig-checker:latest

# The file list comes from git rather than a glob, so a script added later is gated without editing this step.
# A finding that is correct for the shell and wrong for the program it quotes carries an inline disable naming the reason, as repo-config/configure.sh does for its jq filter.
- name: Check shell scripts step
run: |
set -Eeuo pipefail
mapfile -t scripts < <(git ls-files '*.sh')
docker run --rm --pull=always -v "$PWD":/mnt --workdir /mnt koalaman/shellcheck:stable "${scripts[@]}"

- name: Validate registry and spec step
run: |
set -Eeuo pipefail
Expand All @@ -59,6 +67,7 @@ jobs:
- name: Run script self-tests step
run: |
set -Eeuo pipefail
python3 scripts/test_host_gate.py
python3 scripts/test_prose_lint.py
python3 scripts/test_repo_gate.py
python3 scripts/test_pr_review.py
Expand Down
1 change: 1 addition & 0 deletions repo-config/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ check_ruleset() { # payload-file - the live ruleset must match the committed pol
# A host on jq 1.5 would otherwise not degrade, it would fail to compile the filter.
# The check_ruleset function would then report drift on every parameterized rule it never actually compared.
# That is the inverse of the false clean this comparison was written to close, so the portable definition is worth its length.
# shellcheck disable=SC2016 # $in and $k are jq's variables, not shell expansions
norm='def w(f): . as $in
| if type == "object" then reduce keys_unsorted[] as $k ({}; . + { ($k): ($in[$k] | w(f)) }) | f
elif type == "array" then map(w(f)) | f
Expand Down