Skip to content

fix: CS8600 nullable warnings in FileSystemUtility.cs - #27

Closed
Widthdom wants to merge 15 commits into
mainfrom
claude/refactor-large-classes-0jPq9
Closed

fix: CS8600 nullable warnings in FileSystemUtility.cs #27
Widthdom wants to merge 15 commits into
mainfrom
claude/refactor-large-classes-0jPq9

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Add missing ? annotations to 4 local variables that receive values
from nullable-returning methods (TryGetPathRoot, GetUnixMountsFilePath,
TryGetFullPath, GetBestMatchingMountFileSystemType).

claude and others added 15 commits March 20, 2026 12:08
Split 4 bloated classes using C# partial classes to improve maintainability
without changing public API surface or DI registrations:

- ProgramRunner (643→~480 lines) + ProgramRunner.Types.cs (nested types)
- HtmlReportGenerateService (1054 lines) → 5 partial files (Sections, Helpers, Css, Js)
- FolderDiffService (639 lines) → 3 partial files (ILPrecompute, DiffClassification)
- ReportGenerateService (558 lines) → 2 partial files (SectionWriters)

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
…ble warnings

- Enable <Nullable>enable</Nullable> for null-safety awareness
- Enable <TreatWarningsAsErrors>true</TreatWarningsAsErrors> to catch real issues
- Suppress CS1591/CS1573 (XML doc) until full documentation pass
- Suppress CS8600-8604/CS8618/CS8625 (nullable) until annotation pass

New code benefits from nullable context immediately; existing code
won't break until annotations are added incrementally.

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
Add FolderDiffIL4DotNet.Benchmarks project with:
- TextDifferBenchmarks: small (100 lines), medium (10K), large (1M) IL-like diffs
- FolderDiffBenchmarks: file enumeration (100/1K/10K files), hash comparison

Run with: dotnet run -c Release --project FolderDiffIL4DotNet.Benchmarks

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
E2E tests now require FOLDERDIFF_RUN_E2E=true in addition to
dotnet-ildasm availability. This gives CI pipelines explicit control
over whether expensive E2E tests run.

Existing trait filter (--filter "Category!=E2E") still works.

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
…g changes

- CHANGELOG (EN+JP): document partial class decomposition, Nullable/
  TreatWarningsAsErrors enablement, benchmark project, E2E env var
- DEVELOPER_GUIDE: add Partial Class File Layout table and Performance
  Benchmarks section
- TESTING_GUIDE (EN+JP): update E2E test command with FOLDERDIFF_RUN_E2E,
  add benchmark run commands

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
- Add missing ### [1.4.0] heading in Japanese section (was all under [Unreleased])
- Move macOS timestamp fix to [Unreleased] (matching English section)
- Remove duplicate #### 追加 heading
- Structure now mirrors English: [Unreleased] → [1.4.0] → [1.3.0]

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
…uppressions

Annotate all nullable parameters, return types, fields, and local variables
across Core and main projects. Remove CS8600-8604/CS8618/CS8625 NoWarn
suppressions from both csproj files, leaving only XML doc warnings suppressed.

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
…ctions to DEVELOPER_GUIDE

- CHANGELOG: reflect completed nullable annotation pass (no longer "temporarily suppressed")
- DEVELOPER_GUIDE: add "Nullable Reference Types" section with annotation conventions and guidelines (EN+JP)
- DEVELOPER_GUIDE: add missing JP sections for Partial Class layout and Performance Benchmarks

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
Add missing `?` annotations to 4 local variables that receive values
from nullable-returning methods (TryGetPathRoot, GetUnixMountsFilePath,
TryGetFullPath, GetBestMatchingMountFileSystemType).

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
…igService

- Add FolderDiffIL4DotNet.Benchmarks/** to DefaultItemExcludes so
  benchmark .cs files are not compiled as part of the main executable
- Add missing `?` to ConfigService.LoadConfigAsync parameter (CS8625)

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
- DotNetDisassembleService: annotate tuple return types and parameters as nullable
- ProgramRunner: add null-forgiving operators on StepResult access after IsSuccess guard
- RunScopeBuilder: add null-forgiving for DI lambda returning ILCache?
- DotNetDisassemblerCache: annotate GetDisassemblerInfo tuple return as nullable
- ILOutputService/IILOutputService: annotate DisassemblerLabel as string? in return tuple
- ILCachePrefetcher: add null guard before _ilCache dereference
- FolderDiffService: mark executionStrategy parameter as nullable
- ProgressReportService: mark _labelPrefix field as string?
- FileDiffResultLists: mark version parameter as string?
- FileDiffServiceUnitTests: update mock to match nullable interface

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
- DotNetDisassembleService: add null-forgiving (!) after success guards for
  ilText, DisassembleCommandAndItsVersionWithArguments, and stdout; add null
  check before DeleteFileSilent(tempAsciiPath)
- ProgramRunner: mark LoadConfigurationAsync parameter as string?

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
Add null-forgiving operator on DisassembleCommandAndItsVersionWithArguments
passed to RecordDisassemblerUsage (guarded by success check above).

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
Update FolderDiffBenchmarks to call FileComparer.ComputeFileMd5Hex
statically instead of instantiating FileComparer and calling the
renamed ComputeMd5Hash method.

https://claude.ai/code/session_01AGt95LCMWEQgJoQZraKb9V
@Widthdom Widthdom closed this Mar 20, 2026
@Widthdom
Widthdom deleted the claude/refactor-large-classes-0jPq9 branch March 20, 2026 13:57
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.

2 participants