Repository navigation
feat(ci): add sonar-exclusions input to reusable-ci-go - #442
Merged
Merged
Conversation
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
enabled auto-merge (squash)
November 27, 2026 18:50
Contributor
There was a problem hiding this comment.
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.gostops excludingvendor/,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 duplicatesinputs.exclusions.defaultinreusable-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.
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.
Mirror of #441 for the Go workflow. Forwards
sonar-exclusionsto the scan'sexclusionsinput, defaulting to the current list when empty. Needed by FerrLabs/FerrVault#391 to keep*_test.goout of the main source set.