build: run the JustDummies analyzers on our own code (ADR-0061) - #379
Merged
Conversation
Accepts ADR-0061 and implements it. The record argued that a rule's unit
suite proves only that it fires on a snippet its own author wrote for it,
so a wrong model of the library passes both sides — and that every model
error the catalogue has had was caught instead on realistic code, by a
sweep nothing in the repository asked for.
Eight projects now load the analyzers at build and in the IDE: the two
JustDummies suites, the xUnit adapter and its suite, FirstClassErrors'
own suite, the Testing package and its suite, and the binder's suite.
Two consumers are deliberately left out, each with the reason recorded
where someone would otherwise "fix" the omission:
* JustDummies.Analyzers.UnitTests — its subject IS these analyzers.
Loading them into the compilation that builds them makes the analyzer
under test also the analyzer running, and a rule changed there would
report on the source that defines it. This is the circularity the ADR
names among its risks.
* tools/justdummies-check — consumes the PACKED package on purpose, so
that asset selection is exercised as a real consumer sees it. Wiring
would require the ProjectReference that project exists to avoid, and
a diagnostic about how the library is called says nothing about which
asset NuGet resolved.
The two duplicate-collapsing tests gain the suppression the other five
sites already carried: the duplicate IS the subject, and without it there
is nothing to collapse.
Three things were measured rather than assumed. The whole solution builds
with zero diagnostics in Debug and in Release, and 2 168 tests pass. A
planted violation fires in all eight wired projects, so a clean build
means clean rather than never-loaded — the trap an earlier sweep fell
into. And packing JustDummies.Xunit and FirstClassErrors.Testing shows
no new dependency: PrivateAssets keeps the analyzer off the shipped
surface, which matters because both are packable, unlike the sample the
FirstClassErrors analyzers are dogfooded on.
The net472 floor legs build.
The ADR's follow-up actions stay open. In particular this verifies the
LOUD rules: JD020, JD022 and JD024 are Info and do not surface at default
verbosity, and JD011 and JD019 ship disabled. A clean build reads as full
coverage while those five are not exercised, which is the risk the record
states and defers.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKqyhG9Y4AfdxEYekP2Evq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Accepts ADR-0061 and implements it: the JustDummies analyzers now load at build and in the IDE on every project in this repository that consumes JustDummies, so the rules are verified continuously against code that was not written to please them.
Type of change
Changes
ADR-0061 accepted.
Status: Accepted, withAccepted: 2026-07-29added belowProposed:rather than replacing it (ADR-0057). Index and French translation updated.Eight projects wired — both JustDummies suites, the xUnit adapter and its suite, FirstClassErrors' own suite, the
Testingpackage and its suite, and the binder's suite.Two consumers deliberately left out, each with the reason recorded in the project file where someone would otherwise "fix" the omission:
JustDummies.Analyzers.UnitTeststools/justdummies-checkProjectReferencethat project exists to avoid, and a diagnostic about how the library is called says nothing about which asset NuGet resolved.The two duplicate-collapsing tests gain the suppression the other five sites already carried: the duplicate is the subject, and without it there is nothing to collapse.
Three things measured, not assumed
1. A planted violation fires in all eight wired projects. This mattered more than it looks: a clean build would read identically whether the analyzers are clean or were never loaded at all — which is exactly the trap an earlier sweep fell into, when
Inforules stayed silent and the sweep looked green. The control proves loading.2. Neither shipped package gained a dependency. Both
JustDummies.XunitandFirstClassErrors.Testingare packable, unlike the sample the FirstClassErrors analyzers are dogfooded on, so aProjectReferencecould have leaked into their nuspec. Packing and reading the dependency lists:JustDummies.XunitJustDummies,xunit.v3.extensibility.coreFirstClassErrors.TestingFirstClassErrorsNo
JustDummies.Analyzers.PrivateAssets="all"keeps the analyzer off the shipped surface.3. The whole solution is clean. Zero diagnostics in Debug and Release, with 28 rules running across eight projects.
Testing
dotnet build FirstClassErrors.sln— 0 warnings, 0 errors (Debug and Release,--no-incremental)dotnet test FirstClassErrors.sln— 2 168 tests, 0 failures across all 13 test projectsFirstClassErrors.Analyzers.UnitTests, 132;JustDummies.Analyzers.UnitTests, 246)dotnet build JustDummies.UnitTests -c Release -f net472 -p:EnableNet472Floor=trueand the same forJustDummies.PropertyTests— both floor legs cleandotnet packon both packable consumers, dependency lists read from the nuspecMutation testing was not run locally.
Documentation
doc/updated — ADR-0061 status and the ADR index.fr.mdheaderArchitecture decisions
Proposed: ADR-0061ADR-0061 was drafted as
Proposedin #377 and is flipped toAcceptedhere on @Reefact's explicit instruction, not unilaterally.What this does not cover
The ADR's follow-up actions stay open, and one of them qualifies how much this PR actually buys:
This verifies the loud rules.
JD020,JD022andJD024areInfoand do not surface at default build verbosity;JD011andJD019ship disabled. A clean build therefore reads as full coverage while five of the 28 rules are not being exercised at all. Escalating them is a separate decision, which ADR-0061 states as a risk and carries as follow-up rather than smuggling in here.The other two follow-ups — whether the opt-in pair should be exercised anywhere, and whether the FirstClassErrors analyzers deserve the same treatment beyond
FirstClassErrors.Usage— are likewise untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01GKqyhG9Y4AfdxEYekP2Evq
Generated by Claude Code