Commit 037bd8e
committed
Exclude generated OpenAPI models from SonarCloud duplication (CPD) check
Context:
The generated model classes under com/adyen/model/<api>/** follow a
repetitive OpenAPI Generator template (getters/setters, equals/hashCode/
toString, isSet* flags, getExplicitNulls, toJson/fromJson). Sonar's
Copy-Paste Detection flags huge numbers of duplicated blocks across
these files, e.g. CI run: https://github.com/Adyen/adyen-java-api-library/actions/runs/29031747289/job/86166267497?pr=2002
logged 'Too many duplication references ... Keep only the first 100
references' for hundreds of blocks, all within com/adyen/model/**. This
duplication is a byproduct of code generation, not a real maintenance
risk, and drowns out genuine duplication signal in hand-written code.
Change:
Add sonar.cpd.exclusions=**/com/adyen/model/*/** to pom.xml, using the
same glob already applied to sonar.coverage.exclusions for consistency.
This only removes generated model packages from the duplication metric;
Sonar still analyzes them for bugs, vulnerabilities, and code smells,
and hand-written code (serializer packages, services, httpclient, etc.)
remains fully covered by duplication detection.1 parent 965db3d commit 037bd8e
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments