diff --git a/.github/workflows/release_pipeline.yml b/.github/workflows/release_pipeline.yml index 230c828..409d323 100644 --- a/.github/workflows/release_pipeline.yml +++ b/.github/workflows/release_pipeline.yml @@ -546,19 +546,19 @@ jobs: set -euo pipefail required_scripts=( - "scripts/validate/validate_manifest.sh" - "scripts/validate/validate_xml_wellformed.sh" + "scripts/validate/manifest.sh" + "scripts/validate/xml_wellformed.sh" ) optional_scripts=( - "scripts/validate/validate_changelog.sh" - "scripts/validate/validate_language_structure.sh" - "scripts/validate/validate_license_headers.sh" - "scripts/validate/validate_no_secrets.sh" - "scripts/validate/validate_paths.sh" - "scripts/validate/validate_php_syntax.sh" - "scripts/validate/validate_tabs.sh" - "scripts/validate/validate_version_alignment.sh" + "scripts/validate/changelog.sh" + "scripts/validate/language_structure.sh" + "scripts/validate/license_headers.sh" + "scripts/validate/no_secrets.sh" + "scripts/validate/paths.sh" + "scripts/validate/php_syntax.sh" + "scripts/validate/tabs.sh" + "scripts/validate/version_alignment.sh" ) missing=() diff --git a/scripts/validate/tabs.sh b/scripts/validate/tabs.sh index 94b5e1c..8c7e1bb 100644 --- a/scripts/validate/tabs.sh +++ b/scripts/validate/tabs.sh @@ -23,7 +23,7 @@ # DEFGROUP: MokoStandards # INGROUP: GitHub.Actions.CI # REPO: https://github.com/mokoconsulting-tech/MokoStandards -# PATH: /scripts/validate_tabs.sh +# PATH: /scripts/tabs.sh # VERSION: 03.05.00 # BRIEF: CI validator that blocks tab characters in YAML files and enforces two-space indentation policy. # NOTE: YAML is indentation sensitive; tabs are noncompliant. This validator fails the job when any tab is detected. @@ -37,8 +37,8 @@ log() { fail=0 -log "[validate_tabs] Scope: *.yml, *.yaml" -log "[validate_tabs] Policy: tab characters are noncompliant; replace with two spaces" +log "[tabs] Scope: *.yml, *.yaml" +log "[tabs] Policy: tab characters are noncompliant; replace with two spaces" # Find YAML files tracked in git first. If not in a git repo, fall back to filesystem search. yaml_files="" @@ -49,11 +49,11 @@ else fi if [ -z "${yaml_files}" ]; then - log "[validate_tabs] No YAML files found. Status: PASS" + log "[tabs] No YAML files found. Status: PASS" exit 0 fi -log "[validate_tabs] YAML files discovered: $(printf '%s\n' "${yaml_files}" | wc -l | tr -d ' ')" +log "[tabs] YAML files discovered: $(printf '%s\n' "${yaml_files}" | wc -l | tr -d ' ')" while IFS= read -r f; do [ -n "$f" ] || continue @@ -63,7 +63,7 @@ while IFS= read -r f; do # Detect literal tab characters and report with line numbers. if LC_ALL=C grep -n $'\t' -- "$f" >/dev/null 2>&1; then - log "[validate_tabs] FAIL: tab detected in: $f" + log "[tabs] FAIL: tab detected in: $f" # Emit an actionable audit trail: line number plus the exact line content. # Use sed to avoid grep prefix repetition and keep the output deterministic. @@ -71,18 +71,18 @@ while IFS= read -r f; do log " ${hit}" done - log "[validate_tabs] Remediation: replace each tab with exactly two spaces" - log "[validate_tabs] Example: sed -i 's/\\t/ /g' \"$f\"" + log "[tabs] Remediation: replace each tab with exactly two spaces" + log "[tabs] Example: sed -i 's/\\t/ /g' \"$f\"" fail=1 else - log "[validate_tabs] PASS: $f" + log "[tabs] PASS: $f" fi done <<< "${yaml_files}" if [ "$fail" -ne 0 ]; then - log "[validate_tabs] Status: FAIL" + log "[tabs] Status: FAIL" exit 1 fi -log "[validate_tabs] Status: PASS" +log "[tabs] Status: PASS"