Observation
.sonarcloud.properties on main excludes the committed bundles:
sonar.exclusions=skills/spring-docs/scripts/
sonar.cpd.exclusions=skills/spring-docs/scripts/
That landed in ee09832 ("chore(ci): scope Sonar and Codacy off the generated skill bundles"). Yet the SonarCloud analysis of #21 still reported five issues inside the excluded directory:
[CRITICAL/BUG] skills/spring-docs/scripts/docs.mjs:92 — sort without a compare function
[CRITICAL/CODE_SMELL] skills/spring-docs/scripts/docs.mjs:108 — Unexpected var, use let or const
[CRITICAL/CODE_SMELL] skills/spring-docs/scripts/docs.mjs:109 — Unexpected var, use let or const
[MAJOR/CODE_SMELL] skills/spring-docs/scripts/docs.mjs:123 — nested ternary
[CRITICAL/CODE_SMELL] skills/spring-docs/scripts/docs.mjs:417 — Unexpected var, use let or const
The var findings are Bun's output, not anything a person wrote — bun run build:skill:check byte-compares the bundle against a fresh build, so they cannot be edited away. That is exactly the situation the exclusion exists to prevent, and it is the reason the file's own header warns the rating "no edit can recover".
Why it matters
A bundled copy of every source finding double-counts the same program, and a BUG in generated output can hold the quality gate at a D reliability rating on new code that nothing in the repository can fix.
Candidate causes, unverified
- The file's header notes that Automatic Analysis "accepts no wildcards in these values, so paths are written as plain directory prefixes". Whether a trailing-slash directory prefix is honoured, or whether Automatic Analysis expects a glob such as
skills/spring-docs/scripts/**/*, is the first thing to check.
- The same header notes that only the copy on the default branch takes effect. The exclusion is on
main, so that does not explain it — but it is worth re-confirming that the analysis of a PR inherits the default branch's properties rather than the PR head's.
Codacy is configured separately in .codacy.yml with skills/*/scripts/** and should be checked the same way; its check is also failing on #21.
Definition of done
A PR that touches scripts/docs.ts produces no SonarCloud or Codacy finding under skills/*/scripts/, verified on a real PR rather than from configuration alone — the previous attempt looked correct too.
Observation
.sonarcloud.propertiesonmainexcludes the committed bundles:That landed in ee09832 ("chore(ci): scope Sonar and Codacy off the generated skill bundles"). Yet the SonarCloud analysis of #21 still reported five issues inside the excluded directory:
The
varfindings are Bun's output, not anything a person wrote —bun run build:skill:checkbyte-compares the bundle against a fresh build, so they cannot be edited away. That is exactly the situation the exclusion exists to prevent, and it is the reason the file's own header warns the rating "no edit can recover".Why it matters
A bundled copy of every source finding double-counts the same program, and a BUG in generated output can hold the quality gate at a D reliability rating on new code that nothing in the repository can fix.
Candidate causes, unverified
skills/spring-docs/scripts/**/*, is the first thing to check.main, so that does not explain it — but it is worth re-confirming that the analysis of a PR inherits the default branch's properties rather than the PR head's.Codacy is configured separately in
.codacy.ymlwithskills/*/scripts/**and should be checked the same way; its check is also failing on #21.Definition of done
A PR that touches
scripts/docs.tsproduces no SonarCloud or Codacy finding underskills/*/scripts/, verified on a real PR rather than from configuration alone — the previous attempt looked correct too.