docs: SonarCloud whole-file re-attribution on wholesale refactors#88
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
4287377 to
5a8cf06
Compare
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
A wholesale structural change (IIFE→ES module, large class move) makes SonarCloud treat the entire file as new code, so every latent smell counts against the new-code gate and new_maintainability_rating can flip to D. Document it in the CI checklist reference: fix all latent smells in the same change (var→const S3504, cognitive complexity S3776, innerHTML→DOMParser) rather than reverting, and how to list the blocking new-code smells via the api/issues/search endpoint. Kept in references/ (not SKILL.md) to respect the 500-word SKILL.md cap. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
5a8cf06 to
bb1203c
Compare
|
Merged
CybotTM
added a commit
that referenced
this pull request
Jun 18, 2026
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.



What
Adds a SonarCloud Quality Gate Gotcha section to
references/repo-setup-guide.md(the CI-checklists reference).Why
A wholesale structural change to a file — e.g. converting a classic-script IIFE to an ES module — makes SonarCloud attribute the entire file as "new code". Every latent smell in it then counts against the new-code gate, so
new_maintainability_ratingcan flip to D from a change that "only refactored", blocking the merge.Hit for real: an IIFE→ES-module conversion surfaced 62 new-code smells (
varS3504, cognitive complexity S3776,innerHTML) and forced a revert; the redo succeeded only by fixing all of them in the same change. The section recommends fixing-in-place over reverting (includinginnerHTML→DOMParser, which also clears the XSS hotspot) and shows how to list the blocking new-code smells viaapi/issues/search.Kept in
references/(not SKILL.md) to respect the 500-word SKILL.md cap, and written without any credential-bearing command (gitleaks-clean).