Search code examples
sonarqubeinner-classescode-duplication

Can inner classes be excluded from sonar code duplication


In our application there are inner classes defined to create and destroy local variables. But I want to exclude these inner classes from sonar code duplication violations as all inner classes will have same kind of blocks it.


Solution

  • Unfortunately, this is not possible. This is real code duplication, which means you should be able to refactor this into a single place.