[RHIDP-12950]: Rewrite CQA scripts from bash to Node.js ESM#1989
Conversation
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
…pots Add lib/bin.js that resolves git, vale, sed to absolute paths via `which` at startup. All execFileSync calls now use the resolved paths instead of bare binary names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
Previously the workflow only created a new comment when changed files were found. Now it always creates or updates the comment, consistent with other PR workflows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Content Quality Assessment ResultsAutomated CQA check run on the entire repository |
Shellcheck Analysis ResultsChanged shell scripts in this PR: 21 Scripts analyzed:
Check the Files changed tab for detailed shellcheck suggestions. All findings are reported as warnings and won't block the PR. Automated shellcheck analysis • See shellcheck.net for details |
|
Content Quality Assessment ResultsCQA Summary Checklist
Total: 19 checks | 17 passed | 2 with issues To auto-fix what can be auto-fixed, run: To fix remaining issues, copy-paste this prompt to Claude: Automated CQA check run on the entire repository |
|
/cherry-pick release-1.9-post-cqa |
|
@themr0c: new pull request created: #1997 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |



IMPORTANT: Do Not Merge - To be merged by Docs Team Only
Version(s): N/A (build tooling only)
Issue: https://issues.redhat.com/browse/RHIDP-12950
Preview: N/A
Summary
cqa-*.sh) to Node.js ESM modules underbuild/scripts/cqa/--allmode)subs="+attributes,+quotes"to listing/literal blocks{product-cli}and{product-local-very-short}attribute enforcement and fix content--helpflag and alphabetical report orderingBugs found in bash scripts during development
The rewrite uncovered several bugs in the original bash implementations:
sed -i "s/^= ${OLD_TITLE}/= ${FIXED_TITLE_RAW}/"breaks when title contains sed metacharacters (/,&,\). Same issue for xref and include path updates. Node.js uses safereplaceAll().grep -n "$pattern"andsed "s/$pattern/$fix_attr/g"treat product name patterns as regex. Characters like.,(,)would be interpreted as metacharacters instead of literals. Node.js usesincludes()andreplaceAll().sed -i '1s/^/:_mod-docs-content-type: ASSEMBLY\n/'uses\nwhich is not portable across BSD and GNU sed. Node.js uses array manipulation withreadFileSync/writeFileSync.sed 's/\[id="\([^"]*[^}]\)"\]/[id="\1_{context}"]/'requires at least 2 characters in the ID and the second-to-last character to not be}. Single-character IDs or edge cases are missed.INCLUDED_BASENAMES["$inc_bn"]=1meansmodules/foo/bar.adocandassemblies/bar.adocboth map tobar.adoc. If one is included, the other won't be flagged as orphaned (false negative).casestatement only covers a fixed set of gerunds. Unrecognized gerunds fall through to a heuristic that can produce incorrect results. Node.js uses a comprehensive lookup map with a safer fallback.Test plan
node build/scripts/cqa/index.js --alland verify all checks report correctlynode build/scripts/cqa/index.js titles/<title>/master.adocfor a single titlenode build/scripts/cqa/index.js --fix titles/<title>/master.adocand verify fixesnode build/scripts/cqa/index.js --helpshows usage information🤖 Generated with Claude Code