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