Skip to content

Commit 39346d6

Browse files
aksOpsclaude
andauthored
chore(sonar): exclude e2e specs + suppress go:S4036 PATH hotspots (#8)
Two narrow tightenings to cut Sonar noise: - ui/e2e/** added to sonar.exclusions. Playwright specs are test scaffolding (own runner, fixtures, repeat boilerplate) and were showing up as ~45% duplicated source code, polluting the dup metric. - go:S4036 (PATH variable usage) suppressed project-wide via sonar.issue.ignore.multicriteria. ctm is a CLI orchestrator that resolves user-installed tools (git, tmux, claude, gh) through \$PATH on whatever box it's running on; hardcoded absolutes aren't viable across macOS / Linux / Homebrew. Was firing on 30 lines without flagging a real risk. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 21d5284 commit 39346d6

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

sonar-project.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,25 @@ sonar.exclusions=\
2424
**/.codeiq/**,\
2525
internal/serve/dist/**,\
2626
ui/coverage/**,\
27+
ui/e2e/**,\
2728
ui/playwright-report/**,\
2829
ui/test-results/**,\
2930
coverage.out,\
3031
docs/**
3132

33+
# ── Issue suppressions ─────────────────────────────────────────────────
34+
# go:S4036 — "Make sure the PATH variable only contains fixed,
35+
# unwriteable directories." ctm is a CLI orchestrator that intentionally
36+
# resolves user-installed tools (git, tmux, claude, gh) via $PATH on
37+
# whatever box it's running on. Hardcoded absolute paths aren't viable
38+
# across macOS / Linux / Homebrew / system installs. The risk model is
39+
# the user's own shell, not a service account on a server, so the rule
40+
# fires by design rather than flagging real issues. Suppressed
41+
# project-wide.
42+
sonar.issue.ignore.multicriteria=path
43+
sonar.issue.ignore.multicriteria.path.ruleKey=go:S4036
44+
sonar.issue.ignore.multicriteria.path.resourceKey=**/*.go
45+
3246
# ── Tests ──────────────────────────────────────────────────────────────
3347
# Sonar separates "test code" from "production code" so coverage and
3448
# duplication metrics target the right files. Playwright e2e specs

0 commit comments

Comments
 (0)