[AAASM-3802] 🚨 (scripts): Extract index.html literal into a constant (S1192)#45
Merged
Merged
Conversation
…1192) The string literal 'index.html' appeared as a standalone argument to verify_nonempty() 4 times (SonarCloud smell shell:S1192). Define a single readonly constant near the top of the script and reference it at each call site so any future rename is a one-line change. Closes AAASM-3802
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Extract the duplicated
'index.html'string literal (used 4× as a standalone argument toverify_nonempty()) into a singlereadonly INDEX_FILE="index.html"constant defined near the top ofdocs/scripts/aggregate.sh. Resolves SonarCloud code smellshell:S1192(string literals should not be duplicated).Type of Change
Related Issues
Documentation Checklist
cd docs && mdbook buildpasses locally with no warningsdocs/src/SUMMARY.mdValidation
shellcheck docs/scripts/aggregate.sh— exit 0, no warningsbash -n docs/scripts/aggregate.sh— syntax OK$INDEX_FILEexpands to"index.html"at every former hard-coded call siteCloses AAASM-3802
Review record — Claude Code