Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d331eb394b | ||
|
|
d1d874770b |
3 changed files with 8 additions and 7 deletions
|
|
@ -69,7 +69,7 @@ jobs:
|
||||||
- name: lint
|
- name: lint
|
||||||
# jq isn't a project dependency elsewhere in this repo — same
|
# jq isn't a project dependency elsewhere in this repo — same
|
||||||
# nix-shell-for-one-tool shape the vale jobs below use.
|
# nix-shell-for-one-tool shape the vale jobs below use.
|
||||||
run: nix shell nixpkgs#jq --command sh scripts/check-dashboard-descriptions.sh
|
run: nix shell --inputs-from . nixpkgs#jq --command sh scripts/check-dashboard-descriptions.sh
|
||||||
|
|
||||||
shellcheck:
|
shellcheck:
|
||||||
name: shellcheck
|
name: shellcheck
|
||||||
|
|
@ -79,7 +79,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: lint
|
- name: lint
|
||||||
# `nix develop` enters the whole devshell for this one tool, which pins
|
# `nix develop` enters the whole devshell for this one tool, which pins
|
||||||
# shellcheck to flake.lock; the vale and jq jobs take theirs from the registry.
|
# shellcheck to flake.lock, as the vale and jq jobs do with `--inputs-from .`.
|
||||||
#
|
#
|
||||||
# By shebang, not a `*.sh` glob — scripts/pre-push has no suffix.
|
# By shebang, not a `*.sh` glob — scripts/pre-push has no suffix.
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -97,10 +97,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: lint
|
- name: lint
|
||||||
|
# The vale binary comes from flake.lock (`--inputs-from .`), like the devshell's.
|
||||||
# Styles are fetched fresh from Vale Package Hub each run (not vendored).
|
# Styles are fetched fresh from Vale Package Hub each run (not vendored).
|
||||||
# Not wired into branch protection — see prose-lint-errors below for the
|
# Not wired into branch protection — see prose-lint-errors below for the
|
||||||
# error-only slice that is.
|
# error-only slice that is.
|
||||||
run: XDG_DATA_HOME="$PWD/.vale-data" nix shell nixpkgs#vale --command sh -c 'vale sync && vale docs'
|
run: XDG_DATA_HOME="$PWD/.vale-data" nix shell --inputs-from . nixpkgs#vale --command sh -c 'vale sync && vale docs'
|
||||||
|
|
||||||
prose-lint-errors:
|
prose-lint-errors:
|
||||||
name: prose lint (vale, errors)
|
name: prose lint (vale, errors)
|
||||||
|
|
@ -111,4 +112,4 @@ jobs:
|
||||||
- name: lint
|
- name: lint
|
||||||
# Error-level-only slice. Split out so this job alone can be a required
|
# Error-level-only slice. Split out so this job alone can be a required
|
||||||
# check without blocking merges on the warning/suggestion backlog.
|
# check without blocking merges on the warning/suggestion backlog.
|
||||||
run: XDG_DATA_HOME="$PWD/.vale-data" nix shell nixpkgs#vale --command sh -c 'vale sync && vale --minAlertLevel=error docs'
|
run: XDG_DATA_HOME="$PWD/.vale-data" nix shell --inputs-from . nixpkgs#vale --command sh -c 'vale sync && vale --minAlertLevel=error docs'
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@
|
||||||
# Uses `jq` — the right tool for JSON, unlike its zero-dependency siblings
|
# Uses `jq` — the right tool for JSON, unlike its zero-dependency siblings
|
||||||
# in this directory. This script does NOT nix-shell for it itself: the
|
# in this directory. This script does NOT nix-shell for it itself: the
|
||||||
# caller declares that dependency (see `pre-push` and
|
# caller declares that dependency (see `pre-push` and
|
||||||
# `.forgejo/workflows/ci.yml`, the same `nix shell nixpkgs#jq --command sh
|
# `.forgejo/workflows/ci.yml`, the same `nix shell --inputs-from . nixpkgs#jq
|
||||||
# <this file>` shape the vale/shellcheck jobs already use for their own
|
# --command sh <this file>` shape the vale/shellcheck jobs already use for their own
|
||||||
# tools), so a leaf script never hides a nix invocation inside itself.
|
# tools), so a leaf script never hides a nix invocation inside itself.
|
||||||
#
|
#
|
||||||
# Emits a CI error annotation per hit, exits 1 if any hit is found.
|
# Emits a CI error annotation per hit, exits 1 if any hit is found.
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ fi
|
||||||
echo "pre-push: running dashboard-description lint..." >&2
|
echo "pre-push: running dashboard-description lint..." >&2
|
||||||
# jq isn't a project dependency elsewhere in this repo, so the check script
|
# jq isn't a project dependency elsewhere in this repo, so the check script
|
||||||
# assumes nothing about the caller's PATH — nix-shell it here instead.
|
# assumes nothing about the caller's PATH — nix-shell it here instead.
|
||||||
if ! nix shell nixpkgs#jq --command sh "$repo_root/scripts/check-dashboard-descriptions.sh"; then
|
if ! nix shell --inputs-from . nixpkgs#jq --command sh "$repo_root/scripts/check-dashboard-descriptions.sh"; then
|
||||||
echo "pre-push: dashboard-description lint FAILED — fix before pushing" >&2
|
echo "pre-push: dashboard-description lint FAILED — fix before pushing" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue