We recently started having our substantial repositories of code analyzed by Sonarcloud.
Now we have a pull requests that is rejected because of 26% duplicated code, but we cannot find any kind of duplication in the code that is marked as duplications.
How can I see where Sonarcloud thinks the duplicates are?
How can I mark this as a false positive, or mark is as “Accepted” ?
This repo contains mostly Typescript files, implementing a React web app.
The file in question contains definition of all data types, fields and relationships.
a small excert of the “duplicated code”:
PvComplaint:
{
Type: this.getType('Activity.PvComplaint')
},
PvContract:
{
Type: this.getType('Activity.PvContract')
},
PvConversationReport:
{
Type: this.getType('Activity.PvConversationReport')
},
PvCorrespondence:
{
Type: this.getType('Activity.PvCorrespondence')
},
PvPostRegistration:
{
Type: this.getType('Activity.PvPostRegistration')
},
PvThirdPartyContract:
{
Type: this.getType('Activity.PvThirdPartyContract')
},
i.e. the word “PvComplaint” only appears in one other location in the code, with no duplication of the code you see here