Skip to content

[AAASM-3802] 🚨 (scripts): Extract index.html literal into a constant (S1192)#45

Merged
Chisanan232 merged 1 commit into
mainfrom
v0.0.1/AAASM-3802/fix/index_html_constant
Jun 26, 2026
Merged

[AAASM-3802] 🚨 (scripts): Extract index.html literal into a constant (S1192)#45
Chisanan232 merged 1 commit into
mainfrom
v0.0.1/AAASM-3802/fix/index_html_constant

Conversation

@Chisanan232

Copy link
Copy Markdown
Contributor

Description

Extract the duplicated 'index.html' string literal (used 4× as a standalone argument to verify_nonempty()) into a single readonly INDEX_FILE="index.html" constant defined near the top of docs/scripts/aggregate.sh. Resolves SonarCloud code smell shell:S1192 (string literals should not be duplicated).

Type of Change

  • 🔧 Configuration / CI change

Related Issues

  • Related Jira ticket: AAASM-3802
  • Related GitHub issues: N/A

Documentation Checklist

  • cd docs && mdbook build passes locally with no warnings
  • All internal cross-links verified
  • Page registered in docs/src/SUMMARY.md
  • Self-hosted instructions not included (SaaS-only scope)
  • Commits follow GitEmoji convention and are small / atomic

Validation

  • shellcheck docs/scripts/aggregate.sh — exit 0, no warnings
  • bash -n docs/scripts/aggregate.sh — syntax OK
  • Behaviour is identical: $INDEX_FILE expands to "index.html" at every former hard-coded call site

Closes AAASM-3802


Review record — Claude Code

…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
@Chisanan232 Chisanan232 merged commit 984c3a0 into main Jun 26, 2026
3 checks passed
@Chisanan232 Chisanan232 deleted the v0.0.1/AAASM-3802/fix/index_html_constant branch June 26, 2026 07:09
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant