Code duplication should be smarter and avoid raising on C++ recommended patterns

Using SonarQube on C++/17 project.
The Sonar report is complaining on code duplication in an unreasonable way. If I have an abstract base class defining several pure virtual methods, which are then implemented by multiple implementation classes, the header files for those classes will reasonably will have the same lines where the overriden methods signatures are listed in all implementation classes. There is no way to avoid this, and this should not count towards code duplication - lines where only the function signature is declared without body should not be counted as code.

I agree with you this is not ideal. Unfortunately, code duplication is current language agnostic and based on tokens or statements. I moved your post to “suggest new features”