Skip to content

Commit 8f33bc3

Browse files
nanotaboadaclaude
andcommitted
chore(sonar): add Migrations and DbContext to CPD exclusions (#435)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 14efe16 commit 8f33bc3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sonar-project.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ sonar.coverage.exclusions=\
4747
# hotspots) but has no effect on CPD metrics. Files must be listed here to be
4848
# excluded from duplicate code detection.
4949
#
50+
# **/Migrations/** — EF Core migration files are intentionally repetitive
51+
# (sequential InsertData/UpdateData/Sql calls); must be listed explicitly
52+
# here even though already present in sonar.exclusions, as CPD is evaluated
53+
# independently of the global exclusion list.
54+
#
55+
# **/Data/PlayerDbContext.cs — scaffolded EF Core infrastructure; excluded
56+
# from coverage metrics above for the same reason.
57+
#
5058
# test/**/*.cs — Fakes, Mocks, and Stubs are intentionally repetitive by
5159
# design; similarity between arrange/act/assert blocks across tests is
5260
# expected and harmless.
@@ -57,5 +65,7 @@ sonar.coverage.exclusions=\
5765
# =============================================================================
5866

5967
sonar.cpd.exclusions=\
68+
**/Migrations/**,\
69+
**/Data/PlayerDbContext.cs,\
6070
test/**/*.cs,\
6171
**/Validators/PlayerRequestModelValidator.cs

0 commit comments

Comments
 (0)