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
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
<!-- Direct reference: Testing references JustDummies privately (PrivateAssets=all), so it does not flow
transitively; this project uses JustDummies.Any.* directly for arbitrary primitives. -->
<ProjectReference Include="..\JustDummies\JustDummies.csproj" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
<ProjectReference Include="..\FirstClassErrors\FirstClassErrors.csproj" />
<ProjectReference Include="..\FirstClassErrors.Testing\FirstClassErrors.Testing.csproj" />
<ProjectReference Include="..\JustDummies\JustDummies.csproj" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions FirstClassErrors.Testing/FirstClassErrors.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
reference it privately and embed its assembly in this package (see the pack target below);
switch to a NuGet PackageReference once JustDummies is published. -->
<ProjectReference Include="..\JustDummies\JustDummies.csproj" PrivateAssets="all" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<!-- While JustDummies is unpublished, carry JustDummies.dll inside this package's lib/ so a consumer restores it
Expand Down
8 changes: 8 additions & 0 deletions FirstClassErrors.UnitTests/FirstClassErrors.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
<!-- Direct reference: Testing references JustDummies privately (PrivateAssets=all), so it does not flow
transitively; this project uses JustDummies.Any.* directly for arbitrary primitives. -->
<ProjectReference Include="..\JustDummies\JustDummies.csproj" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj" />
<!-- The core is referenced so JustDummies.Any resolves inside the snippets the harness compiles. -->
<ProjectReference Include="..\JustDummies\JustDummies.csproj" />

<!-- Deliberately NOT wired for the JustDummies analyzers, unlike every other JustDummies consumer here
(ADR-0061). This project's own subject is those analyzers: loading them into the compilation that
builds and instantiates them makes the analyzer under test also the analyzer running, and a rule
changed here would then report on the very source that defines it. The rules are exercised against
realistic code in the projects the ADR names; this one exercises them against snippets instead. -->
<!-- The adapter is referenced so [Reproducible] resolves in the snippets the lifecycle rules are tested against.
The analyzers themselves never reference it — they resolve it by metadata name, and stay silent without it. -->
<ProjectReference Include="..\JustDummies.Xunit\JustDummies.Xunit.csproj" />
Expand Down
8 changes: 8 additions & 0 deletions JustDummies.PropertyTests/JustDummies.PropertyTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
<!-- JustDummies only: like JustDummies.UnitTests, this test project deliberately references no
FirstClassErrors project, so the standalone boundary of the library under test stays visible. -->
<ProjectReference Include="..\JustDummies\JustDummies.csproj" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions JustDummies.UnitTests/AnyOneOfTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public void VariesAcrossDraws() {
}

[Fact(DisplayName = "Duplicate values are collapsed under the default comparer: both distinct values are still drawn, nothing else.")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("JustDummies.Constraints", "JD025:The same value is listed twice in a pool",
Justification =
"The duplicate IS the subject. This pins the collapsing JD025 reports: without it there is nothing to collapse and the test " +
"asserts nothing.")]
public void DuplicatesAreCollapsed() {
HashSet<int> seen = [.. Samples(Any.OneOf(1, 1, 2))];

Expand Down
4 changes: 4 additions & 0 deletions JustDummies.UnitTests/AnyStringValueSetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public void VariesAcrossDraws() {
}

[Fact(DisplayName = "Duplicate values are collapsed: both distinct values are still drawn, nothing else.")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("JustDummies.Constraints", "JD025:The same value is listed twice in a pool",
Justification =
"The duplicate IS the subject. This pins the collapsing JD025 reports: without it there is nothing to collapse and the test " +
"asserts nothing.")]
public void DuplicatesAreCollapsed() {
HashSet<string> seen = [.. Samples(Any.String().OneOf("a", "a", "b"))];

Expand Down
8 changes: 8 additions & 0 deletions JustDummies.UnitTests/JustDummies.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@
<!-- JustDummies only: this test project deliberately references no FirstClassErrors project, so the
standalone boundary of the library under test stays visible in its own test bed. -->
<ProjectReference Include="..\JustDummies\JustDummies.csproj" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
<!-- The adapter under test, and JustDummies for the values it pins. Deliberately no FirstClassErrors
reference: the standalone boundary of the package under test stays visible in its own test bed. -->
<ProjectReference Include="..\JustDummies.Xunit\JustDummies.Xunit.csproj" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions JustDummies.Xunit/JustDummies.Xunit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
<!-- JustDummies only. This package exists precisely because JustDummies cannot reference a test framework
itself (ADR-0011); it must not acquire a FirstClassErrors dependency either. -->
<ProjectReference Include="..\JustDummies\JustDummies.csproj" />

<!-- Run the JustDummies analyzers on this project (ADR-0061): OutputItemType=Analyzer loads them at
build and in the IDE, ReferenceOutputAssembly=false keeps them off the runtime graph, and
PrivateAssets=all stops the reference from reaching a consumer of this project. -->
<ProjectReference Include="..\JustDummies.Analyzers\JustDummies.Analyzers.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

🌍 🇫🇷 Français (ce fichier) · 🇬🇧 [English](0061-run-the-justdummies-analyzers-on-the-repository-s-own-code.md)

**Statut :** Proposé
**Statut :** Accepté
**Proposé :** 2026-07-29
**Accepté :** 2026-07-29
**Décideurs :** Reefact

## Contexte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

🌍 🇬🇧 English (this file) · 🇫🇷 [Français](0061-run-the-justdummies-analyzers-on-the-repository-s-own-code.fr.md)

**Status:** Proposed
**Status:** Accepted
**Proposed:** 2026-07-29
**Accepted:** 2026-07-29
**Decision Makers:** Reefact

## Context
Expand Down
2 changes: 1 addition & 1 deletion doc/handwritten/for-maintainers/adr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,4 @@ Optional supporting material:
| [ADR-0058](0058-suppress-ca1510-while-the-netstandard-floor-stands.md) | Suppress CA1510 while the pre-.NET-6 floor stands | Accepted |
| [ADR-0059](0059-guard-the-recipe-versus-value-boundary-with-analyzers.md) | Guard the recipe-versus-value boundary with analyzers where the type system cannot reach it | Proposed |
| [ADR-0060](0060-let-stated-intent-outrank-generic-analyzer-advice.md) | Let stated intent outrank generic analyzer advice, and record the refusal beside the rule | Proposed |
| [ADR-0061](0061-run-the-justdummies-analyzers-on-the-repository-s-own-code.md) | Run the JustDummies analyzers on the repository's own code, so the rules are verified against code not written to please them | Proposed |
| [ADR-0061](0061-run-the-justdummies-analyzers-on-the-repository-s-own-code.md) | Run the JustDummies analyzers on the repository's own code, so the rules are verified against code not written to please them | Accepted |
6 changes: 6 additions & 0 deletions tools/justdummies-check/JustDummiesCheck.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
version is pinned EXACTLY, not floated, and nuget.config maps the id to the local feed only, so a future
stable JustDummies on nuget.org can never be substituted for the artifact under test. -->
<PackageReference Include="JustDummies" Version="$(JustDummiesCheckVersion)" />

<!-- Deliberately NOT wired for the JustDummies analyzers, unlike the repository's other JustDummies
consumers (ADR-0061). Wiring them would need a ProjectReference, which the comment above explains this
project must never take: it consumes the PACKED package precisely so asset selection is exercised as a
real consumer sees it. The one contract checked here is which asset NuGet resolves, and a diagnostic
about how the library is called says nothing about that. -->
</ItemGroup>

</Project>
Loading