From 2ff04d86bc7135e5345c16309ef2300a4846706a Mon Sep 17 00:00:00 2001 From: Jonathan Matthews Date: Tue, 22 Oct 2024 14:14:54 +0100 Subject: [PATCH] _scripts: rename content linter This renames the script that lints some aspects of the content hierarchy into the _scripts/content* namespace, aligning it with _scripts/contentNewDocument.bash. Signed-off-by: Jonathan Matthews Change-Id: Ib38338e5ea583019d9300707284d667b58134810 --- .github/workflows/trybot.yaml | 2 +- _scripts/{checkContent.bash => contentLint.bash} | 2 +- _scripts/staticcheck.bash | 2 +- internal/ci/github/trybot.cue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename _scripts/{checkContent.bash => contentLint.bash} (95%) diff --git a/.github/workflows/trybot.yaml b/.github/workflows/trybot.yaml index 22bd36e3db..280fe5bce2 100644 --- a/.github/workflows/trybot.yaml +++ b/.github/workflows/trybot.yaml @@ -168,7 +168,7 @@ jobs: - name: Early git and code sanity checks run: go run cuelang.org/go/internal/ci/checks@v0.11.0-0.dev.0.20240903133435-46fb300df650 - name: Perform early content checks - run: _scripts/checkContent.bash + run: _scripts/contentLint.bash - name: Check site CUE configuration run: _scripts/runPreprocessor.bash execute --check - name: Regenerate diff --git a/_scripts/checkContent.bash b/_scripts/contentLint.bash similarity index 95% rename from _scripts/checkContent.bash rename to _scripts/contentLint.bash index dc7877c38a..55d015f313 100755 --- a/_scripts/checkContent.bash +++ b/_scripts/contentLint.bash @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -# checkContent.bash asserts that specific pages under content/ and hugo/ +# contentLint.bash asserts that specific pages under content/ and hugo/ # contain (or don't contain) particular content. These are checks which should # probably live elsewhere (e.g. the preprocessor), but are placed here until # implemented in a more principled manner. diff --git a/_scripts/staticcheck.bash b/_scripts/staticcheck.bash index 0aa9428b7e..802642756c 100755 --- a/_scripts/staticcheck.bash +++ b/_scripts/staticcheck.bash @@ -4,7 +4,7 @@ set -eu # When bumping this version, don't forget to grep the repo for "staticcheck ..." # and to sed the upgrade of the hard-coded checks that are tested for by -# _scripts/checkContent.bash. +# _scripts/contentLint.bash. go run honnef.co/go/tools/cmd/staticcheck@v0.5.1 $(go list ./... | grep -v github.com/cue-lang/cuelang.org/playground/internal/cuelang_org_go_internal | grep -v github.com/cue-lang/cuelang.org/internal/parse diff --git a/internal/ci/github/trybot.cue b/internal/ci/github/trybot.cue index dc43f05da1..1628a4f142 100644 --- a/internal/ci/github/trybot.cue +++ b/internal/ci/github/trybot.cue @@ -124,7 +124,7 @@ workflows: trybot: _repo.bashWorkflow & { json.#step & { name: "Perform early content checks" - run: "_scripts/checkContent.bash" + run: "_scripts/contentLint.bash" }, // We can perform an early check that ensures page.cue files are