Skip to content

Add an Inspect target that sorts ReSharper and Roslyn findings into triage buckets - #711

Draft
ANcpLua wants to merge 3 commits into
Fallout-build:developfrom
ANcpLua:feature/inspect-component
Draft

ANcpLua wants to merge 3 commits into
Fallout-build:developfrom
ANcpLua:feature/inspect-component

Conversation

@ANcpLua

@ANcpLua ANcpLua commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Problem

Finding the risky items among hundreds of ReSharper and Roslyn findings is manual work today. Fallout has no ReSharper wrapper since the JetBrains tooling cleanup (97ea857), and one solution-wide -p:ErrorLog=... loses findings because every compiler call overwrites the same file.

Outcome

  • ReSharper wrapper is back (ReSharperInspectCode, ReSharperCleanupCode), updated to the jb 2026.2 options. dupfinder stays out: JetBrains removed it. The tool path is RESHARPER_EXE, then jb on the PATH (the global .NET tool), then the JetBrains.ReSharper.GlobalTools package. New ToolPathResolver.TryGetPathExecutable returns null instead of failing.
  • IInspect component (behind [Experimental("FALLOUT005")]). fallout Inspect:
    1. runs dotnet build --no-incremental, with one Roslyn SARIF error log per project and target framework (an imported targets file sets ErrorLog);
    2. runs jb inspectcode --severity=HINT --no-swea --no-build;
    3. merges both, drops suppressed results, obj/ and generated files, keeps one finding per rule, file and line;
    4. sorts findings into runtime-candidate, review, mechanical and unclassified with an overridable rule table (InspectRules), and flags test files;
    5. writes inspect.sarif, inspect.tsv and inspect.md to the reports directory and one count line per bucket to stderr.
      It only reports: a failing build or tool logs a warning.
  • Shim generator skips [Experimental] types. They have no NUKE-era consumers, and a shim deriving from one fails the shim build.
  • FALLOUT002 to FALLOUT004 are already used by other warnings, so the new ID is FALLOUT005. The registry now says so.

Acceptance criteria

  • InspectReportSpecs (merge, dedupe, filters, buckets, test flag, TSV) and TransitionShimGeneratorSpecs pass.
  • ./build.sh Compile passes.
  • End to end on a real solution (qyl, 22 projects, 3.5 minutes): 853 findings, 33 runtime-candidate, 79 review, 741 mechanical, 0 unclassified. All 284 rule, file and line keys of a hand triage at the default inspectcode severity are in the report. The known bug (a switch expression that throws for unhandled enum values) lands in runtime-candidate.

Usage

#pragma warning disable FALLOUT005
class Build : FalloutBuild, IInspect { }

🤖 Generated with Claude Code

ANcpLua and others added 3 commits October 14, 2026 22:23
- Bring back src/Fallout.Common/Tools/ReSharper, which was deleted with
  the JetBrains tooling cleanup (97ea857), updated to the options of
  the jb global tool 2026.2. dupfinder is gone: JetBrains removed it.
- The tool path is RESHARPER_EXE, then jb on the PATH (the global .NET
  tool), then the JetBrains.ReSharper.GlobalTools package in the NuGet
  packages folder.
- Add ToolPathResolver.TryGetPathExecutable, which returns null instead
  of failing when the executable is not on the PATH.
- The CLI tools table lists the commands the wrapper has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An experimental type is new surface with no NUKE-era consumers. A
Nuke.* shim that derives from it fails the shim project's build with
the experimental diagnostic, so the generator now skips such types
without a SHIM001 warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto triage buckets

`fallout Inspect` runs one `dotnet build --no-incremental` that writes a
Roslyn SARIF error log per project and target framework, then
`jb inspectcode --severity=HINT --no-swea --no-build`. It merges both
reports, drops suppressed results and findings in obj/ or generated
files, keeps one finding per rule, file and line, and sorts each finding
into runtime-candidate, review, mechanical or unclassified with an
overridable rule table. Test files are flagged.

- Reports: inspect.sarif, inspect.tsv and inspect.md in the reports
  directory, and one count line per bucket on stderr.
- The target only reports. A failing build or tool logs a warning.
- A single ErrorLog path for a solution build would be overwritten by
  every compiler call, so an imported targets file gives each project
  its own error log.
- New public API is behind [Experimental("FALLOUT005")].
  FALLOUT002 to FALLOUT004 are already used by other warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ANcpLua
ANcpLua requested a review from a team as a code owner October 14, 2026 20:24
Copilot AI balanced review requested due to automatic review settings October 14, 2026 20:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@dennisdoomen

Copy link
Copy Markdown
Collaborator

Before you suggest a PR, please first create an issue and wait until it's approved.

@dennisdoomen
dennisdoomen marked this pull request as draft October 16, 2026 08:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants