Skip to content

feat(ci): add sonar-exclusions input to reusable-ci-go - #442

Merged
BryanFRD merged 1 commit into
mainfrom
feat/ci-go-sonar-exclusions
Nov 27, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
feat/ci-go-sonar-exclusions

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Mirror of #441 for the Go workflow. Forwards sonar-exclusions to the scan's exclusions input, defaulting to the current list when empty. Needed by FerrLabs/FerrVault#391 to keep *_test.go out of the main source set.

Mirrors reusable-ci-node. The scan always passes -Dsonar.exclusions, which overrides sonar-project.properties, so callers with colocated tests (Go) need a way to exclude them from the main source set.
@BryanFRD
BryanFRD enabled auto-merge (squash) November 27, 2026 18:50

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. Adds a sonar-exclusions input to reusable-ci-go and forwards it to the scan. Nothing blocking. The inline fallback list is needed: GitHub does not apply a callee default when the caller passes an empty string, so forwarding '' would override the scan workflow default with an empty value. The literal matches the default of the pinned scan workflow at efe7f97.

Code review found two non-blocking points (nothing is posted inline):

  • minor, .github/workflows/reusable-ci-go.yml:80: the input description does not say that a non-empty value replaces the default list rather than extending it. A caller passing only **/*_test.go stops excluding vendor/, node_modules/, build/ and the other defaults, so those enter the analysis. Suggested wording: "Replaces (does not extend) the scan workflow default list; include those globs if you still need them, e.g. **/vendor/**,**/*_test.go."
  • suggestion, .github/workflows/reusable-ci-go.yml:302: the fallback literal duplicates inputs.exclusions.default in reusable-sonarqube-scan.yml, so the two will drift when the scan workflow pin is bumped. Add a short comment pointing at the source so whoever bumps the pin updates both.

@BryanFRD
BryanFRD merged commit 47ce918 into main Nov 27, 2026
11 checks passed
@BryanFRD
BryanFRD deleted the feat/ci-go-sonar-exclusions branch November 27, 2026 18:51
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