Skip to content
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

SonarCloud Quality Gate Code duplication rule too restrictive #744

Open
lpalashevski opened this issue Aug 3, 2022 · 3 comments
Open

SonarCloud Quality Gate Code duplication rule too restrictive #744

lpalashevski opened this issue Aug 3, 2022 · 3 comments

Comments

@lpalashevski
Copy link
Contributor

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 14 Code Smells

No Coverage information No Coverage information
9.0% 9.0% Duplication

Originally posted by @sonarcloud[bot] in #743 (comment)

@lpalashevski
Copy link
Contributor Author

Checking for code duplication is most of the times very useful. However, also many times it is not easy to configure rule on how duplication is detected for given context and coding style.

Some of the Egeria frameworks and patterns in the code especially when writing connector are contradicting this to some extend and code gets duplicated. Example is where we are writing two connector provides/connectors to achieve same goal in different way. In cases like this we have to think about code duplication for limited scope (connector) and not across all connectors.

We are trying to keep this practice to minimum but there will be cases where duplicating code is just fine.

Default code duplication quality check we are using at the moment is <=3%. This is too restrictive and it is blocking us at the moment.

We need either to find smarter way to configure the rule (not sure if tools support this) or just simply increase the duplication threshold for certain repos.

any other thoughts?

cc: @planetf1

@planetf1
Copy link
Member

planetf1 commented Aug 7, 2022

Agree with your summary

Some work is needed to add the GitHub action to run the scan on the repositories we are interested in. I've been doing this before vacation for the new HMS connector, though have a glitch to resolve. Once done we can adopt that pattern across our other repos that are not currently fully scanning (including this one)

@planetf1
Copy link
Member

I opened odpi/egeria#6805 to track getting our sonar scan working across all repos

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

No branches or pull requests

2 participants