-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude code from SonarCloud analysis #2809
Conversation
tpantelis
commented
Nov 22, 2023
- Generated code
- Test support
- External library wrappers
- Generated code - Test support - External library wrappers Signed-off-by: Tom Pantelis <[email protected]>
🤖 Created branch: z_pr2809/tpantelis/sonar_exclude |
@@ -2,7 +2,7 @@ sonar.projectKey=submariner-io_submariner | |||
sonar.projectName=submariner | |||
sonar.organization=submariner-io | |||
sonar.sources=. | |||
sonar.exclusions=**/vendor/**,**/*_test.go,**/test/**,**/fake/**,**/client/** | |||
sonar.exclusions=**/vendor/**,**/*_test.go,**/test/**,**/fake/**,**/client/**,**/natdiscovery/proto/natdiscovery.pb.go,**/netlink/**,**/event/testing/**,**/zz_generated.deepcopy.go,**/ipset/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the removal of ipset and netlink packages intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, yes, because they are external library wrappers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all APIs are passthrough, we have some APIs implemented. Do we want to avoid sonar on them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
netlink
is a straight pass-through. ipset
is not our code - we copied it from somewhere. There might be some helper methods we could unit test but I don't think it's necessary. I think the E2E tests it sufficiently, at least the code we use. @sridhargaddam What API are you specifically concerned about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, FWICT, virtually all helpers, eg validate*, are private.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, there are few APIs like Create/Add/Del/Destroy etc, but the code is pretty much stable and has not undergone any major changes, so we can skip it. I wanted to confirm that we did not accidentally remove them.
🤖 Closed branches: [z_pr2809/tpantelis/sonar_exclude] |