-
ALM used
GitHub -
CI system used
AWS CodeBuild -
Scanner command used when applicable
dotnet sonarscanner begin (version 10.2.0) -
Languages of the repository
-
C#
-
Only if the SonarCloud project is public
not public -
Error observed
We recently added a PR quality gate in our repos in Github and used the property
sonar.qualitygate.wait=true to avoid merged code where there are quality issues.
The problem now is we have a PR, where the code change is replacing an internal nuget package, this means replacing an attribute in controller methods (the methods only have this attribute once) and also updating the usings of the files. This is creating an issue in the PR for code duplication, the change is something like this (in multiple classes in different folders):
original file
using Namespace1;
public class Controller
{
[Attribute1]
public Task Method1()
{
}
[Attribute1]
public Task Method2()
{
}
}
after the change
using Namespace2;
public class Controller
{
[Attribute2]
public Task Method1()
{
}
[Attribute2]
public Task Method2()
{
}
}
Is there a way to ignore this issue?
Thanks