Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-FileCopyrightText: 2026 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: CC0-1.0

# SonarCloud Automatic Analysis configuration.
#
# NOTE: Automatic Analysis reads THIS file (.sonarcloud.properties) and ignores
# any sonar-project.properties. See:
# https://docs.sonarsource.com/sonarqube-cloud/analyzing-source-code/automatic-analysis/
#
# The new-code duplication gate (new_duplicated_lines_density <= 3%) was tripping
# at ~22.9% because Sonar's copy-paste detector counted two classes of code that
# are duplicated by design, not by neglect:
#
# 1. Upjet-generated `zz_*.go` (resolvers, deepcopy, generated types) — ~77% of
# the flagged lines. Machine-generated boilerplate; not ours to edit. Already
# treated as generated by golangci-lint (`generated: lax`) and ignored by
# codecov.
# 2. The intentional cluster/ <-> namespaced/ mirror of hand-written controllers
# and API types — a deliberate Crossplane v2 dual-scope architecture, so the
# two trees are near-identical twins by construction.
#
# Fix: drop generated code from all analysis, and exclude the mirrored hand-written
# controllers/types from duplication detection only (they still get bug/security/
# reliability analysis).

# Generated code — exclude from ALL analysis (mirrors golangci `generated: lax`).
sonar.exclusions=**/zz_*.go

# Hand-written cluster/namespaced mirror — suppress the copy-paste flag only;
# these files still participate in every other rule.
sonar.cpd.exclusions=internal/controller/**/*.go,apis/**/*_types.go
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Release notes are generated from [Conventional Commits](https://www.conventional
(with a leading gitmoji token) on the default branch using
[git-cliff](https://git-cliff.org/).

## [Unreleased]

### Bug Fixes

- **sonar:** Exclude generated + cluster/namespaced mirror from duplication gate [df8ae6f](https://github.com/platformrelay/provider-gridscale/commit/df8ae6ff928549dd37ffe6d3529b1641c53da09b)

## [0.3.0](https://github.com/platformrelay/provider-gridscale/compare/v0.2.2..v0.3.0) - 2026-07-31

### Bug Fixes
Expand Down
Loading