@@ -69,50 +69,24 @@ dotnet_diagnostic.CA1859.severity = none
6969# --- Sonar rules not yet enforced: the backlog -------------------------------------------------
7070#
7171# build/sonar-profile.globalconfig is generated from the SonarCloud quality profile and puts every
72- # rule it activates at `warning`, so the default is ENFORCE. The 27 rules below are the
73- # exceptions: each still has violations in this tree, and promoting it now would turn unrelated
74- # pull requests red. They are demoted to `suggestion` — active, non-blocking — with the number of
75- # sites measured when this landed.
72+ # rule it activates at `warning`, so the default is ENFORCE. This block held the exceptions: rules
73+ # with violations still in the tree, demoted to `suggestion` — active, non-blocking — so promoting
74+ # one did not turn unrelated pull requests red.
7675#
77- # This block IS the backlog, and it shrinks by DELETION: clear a rule's sites, delete its line,
78- # and the generated file enforces it from the next build with nothing further to write. A rule
79- # this codebase means to refuse outright does not belong here — it belongs with the declines
80- # above, at `none`, with its reason (ADR-0060). `suggestion` means "not yet", never "no" .
76+ # THE BACKLOG IS EMPTY. All 377 rules the profile activates are enforced as of this commit, measured
77+ # by elevating every entry to `warning` and building the solution: zero sites. The block is kept, with
78+ # nothing in it, because the mechanism outlives the list — the next generated profile may activate a
79+ # rule this tree violates, and this is where it goes .
8180#
82- # The other 350 rules the profile activates have zero violations here and are
83- # enforced as of this commit. Total outstanding: 83 sites. Decision: ADR-0062.
81+ # The block shrinks by DELETION: clear a rule's sites, delete its line, and the generated file
82+ # enforces it from the next build with nothing further to write. A rule this codebase means to refuse
83+ # outright does not belong here — it belongs with the declines above, at `none`, with its reason
84+ # (ADR-0060), or in the test-scoped section below when its whole domain is test-shaped.
85+ # `suggestion` means "not yet", never "no". Decision: ADR-0062.
8486#
85- # A rule leaves this block by one of two doors, and both are visible in the tree: its sites are
86- # cleared, or the few that remain are deliberate and carry a [SuppressMessage] with the reason at
87- # the site. The second door keeps the rule enforced everywhere else, which parking it never did.
88-
89- dotnet_diagnostic.S1244.severity = suggestion # 15 — Floating point numbers should not be tested for equality
90- dotnet_diagnostic.S3878.severity = suggestion # 14 — Arrays should not be created for params parameters
91- dotnet_diagnostic.S3218.severity = suggestion # 8 — Inner class members should not shadow outer class " static" or type members
92- dotnet_diagnostic.S107.severity = suggestion # 6 — Methods should not have too many parameters
93- dotnet_diagnostic.S1481.severity = suggestion # 5 — Unused local variables should be removed
94- dotnet_diagnostic.S1854.severity = suggestion # 4 — Unused assignments should be removed
95- dotnet_diagnostic.S4144.severity = suggestion # 3 — Methods should not have identical implementations
96- dotnet_diagnostic.S108.severity = suggestion # 2 — Nested blocks of code should not be left empty
97- dotnet_diagnostic.S125.severity = suggestion # 2 — Sections of code should not be commented out
98- dotnet_diagnostic.S1905.severity = suggestion # 2 — Redundant casts should not be used
99- dotnet_diagnostic.S2326.severity = suggestion # 2 — Unused type parameters should be removed
100- dotnet_diagnostic.S3220.severity = suggestion # 2 — Method calls should not resolve ambiguously to overloads with " params"
101- dotnet_diagnostic.S3358.severity = suggestion # 2 — Ternary operators should not be nested
102- dotnet_diagnostic.S6966.severity = suggestion # 2 — Awaitable method should be used
103- dotnet_diagnostic.S927.severity = suggestion # 2 — Parameter names should match base declaration and other partial definitions
104- dotnet_diagnostic.S1144.severity = suggestion # 1 — Unused private types or members should be removed
105- dotnet_diagnostic.S2219.severity = suggestion # 1 — Runtime type checking should be simplified
106- dotnet_diagnostic.S2342.severity = suggestion # 1 — Enumeration types should comply with a naming convention
107- dotnet_diagnostic.S2692.severity = suggestion # 1 — " IndexOf" checks should not be for positive numbers
108- dotnet_diagnostic.S3376.severity = suggestion # 1 — Attribute, EventArgs, and Exception type names should end with the type being extended
109- dotnet_diagnostic.S3459.severity = suggestion # 1 — Unassigned members should be removed
110- dotnet_diagnostic.S3871.severity = suggestion # 1 — Exception types should be " public"
111- dotnet_diagnostic.S3877.severity = suggestion # 1 — Exceptions should not be thrown from unexpected methods
112- dotnet_diagnostic.S3881.severity = suggestion # 1 — " IDisposable" should be implemented correctly
113- dotnet_diagnostic.S4136.severity = suggestion # 1 — Method overloads should be grouped together
114- dotnet_diagnostic.S6580.severity = suggestion # 1 — Use a format provider when parsing date and time
115- dotnet_diagnostic.S6608.severity = suggestion # 1 — Prefer indexing instead of " Enumerable" methods on types implementing " IList"
87+ # A rule leaves by one of two doors, and both are visible in the tree: its sites are cleared, or the
88+ # few that remain are deliberate and carry a [SuppressMessage] with the reason at the site. The second
89+ # door keeps the rule enforced everywhere else, which parking it never did.
11690
11791# Test projects only. `*Tests` matches the thirteen test projects and no shipping one —
11892# FirstClassErrors.Testing ends in `Testing`, so the rule below does not reach it.
@@ -126,6 +100,33 @@ dotnet_diagnostic.S6608.severity = suggestion # 1 — Prefer indexing instead
126100# genuinely want it — which is why this is scoped here rather than switched off repository-wide.
127101dotnet_diagnostic.CA1861.severity = none
128102
103+ # Declined in tests: exact floating-point equality. S1244 assumes an `==` between doubles is an
104+ # accident of arithmetic. In these suites it is the assertion: `Between(value, value)` declares a
105+ # degenerate interval and the property is that the draw IS that value; `bounds.Min == bounds.Max`
106+ # detects that degenerate case to branch on it; `Zero()` pins a value and `== Half.Zero` is the
107+ # contract it promises. A tolerance would not make these checks safer, it would stop them testing
108+ # what they exist to test. Shipping code keeps the rule, where an `==` between computed floats
109+ # really is the bug the rule describes.
110+ dotnet_diagnostic.S1244.severity = none
111+
112+ # Declined in tests: parameter-count ceilings. S107 caps a lambda at seven parameters. The lambdas
113+ # it fires on are the eight-operand `Any.Combine` overload's composer — the arity IS the subject of
114+ # the test, and it is fixed by the API being exercised, not chosen by the test. The rule stays ON
115+ # for shipping code, where a long parameter list is a design smell rather than a fixture.
116+ dotnet_diagnostic.S107.severity = none
117+
118+ # Declined in tests: unused generic type parameters. S2326 is right that a `<T>` nothing reads is
119+ # dead weight — except in a fixture built to be READ BY REFLECTION, where the unused parameter is
120+ # precisely the shape under test (an overload that differs only by arity, a generic-only member the
121+ # documentation reader must find). Removing it would delete the test case.
122+ dotnet_diagnostic.S2326.severity = none
123+
124+ # Declined in tests: empty blocks. S108 asks that `{ }` be filled or removed. In these suites the
125+ # empty body IS the exercise: `using (Any.UseSeed(1, …)) { }` enters and leaves a scope to assert
126+ # what disposal does, and filling the block would add a statement with nothing to say. The rule
127+ # stays ON for shipping code, where an empty block is usually a forgotten branch.
128+ dotnet_diagnostic.S108.severity = none
129+
129130[* .{csproj,props,targets,nuspec,config,xml} ]
130131indent_size = 2
131132
0 commit comments