Skip to content

Commit 6fd7eef

Browse files
randleeclaude
andcommitted
feat: Add integration tests and comprehensive documentation (Sprint 6)
Completes Sprint 6 with integration tests, sample files, and full documentation. Integration Tests: - 24 comprehensive end-to-end tests covering all TFM scenarios - Test CLI → Engine → Output formatters flow - Test single and multiple TFM analysis - Test all output formats (JSON, HTML, PlainText) - Test error handling and edge cases - Test performance optimizations - All 24 tests passing, 0 regressions Sample Files: - samples/multi-tfm/old-conditional-code.cs (78 lines) - samples/multi-tfm/new-conditional-code.cs (131 lines) - samples/multi-tfm/README.md (documentation) - Realistic .NET code with #if directives demonstrating TFM-specific changes Documentation: - Updated README.md with Multi-TFM Analysis section - Created docs/tfm-support.md (1,106 lines comprehensive guide) - Supported TFMs reference - CLI usage examples - Architecture overview - Advanced scenarios - Performance considerations - Troubleshooting guide - Best practices - FAQ (15 questions) - Updated docs/api.md with programmatic usage examples - Enhanced XML documentation in all TFM classes Bug Fix: - Fixed XML documentation error in TfmParser.cs Tests: 24 new integration tests. Total: 1,645 tests passing (0 regressions). Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 68bb77d commit 6fd7eef

File tree

10 files changed

+3310
-6
lines changed

10 files changed

+3310
-6
lines changed

README.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ Fine-grained whitespace handling with language-aware detection:
4545

4646
See [Whitespace Handling Guide](docs/whitespace-handling.md) for comprehensive details.
4747

48+
### Multi-Target Framework Analysis (v0.9.0) 🎯
49+
50+
Analyze code changes across multiple .NET target frameworks simultaneously:
51+
52+
- **Multi-TFM diff support**: Compare code compiled for different target frameworks (net8.0, net10.0, etc.)
53+
- **Conditional compilation detection**: Identifies changes within `#if`, `#elif`, preprocessor blocks
54+
- **Symbol resolution**: Automatically resolves TFM-specific symbols (NET8_0, NET10_0_OR_GREATER, etc.)
55+
- **TFM-specific change tracking**: Each change indicates which frameworks it applies to
56+
- **Performance optimized**: Pre-scan detects preprocessor directives, skips multi-TFM analysis when not needed
57+
- **Parallel processing**: Analyzes multiple TFMs concurrently for faster results
58+
59+
See [Multi-TFM Support Guide](docs/tfm-support.md) for comprehensive details.
60+
4861
### Core Features
4962

5063
- **Semantic Diff** - Understands code structure, not just text changes
@@ -115,6 +128,25 @@ roslyn-diff diff old.cs new.cs --html report.html --open
115128
roslyn-diff diff old.cs new.cs --git
116129
```
117130

131+
### Multi-Target Framework Analysis
132+
133+
```bash
134+
# Analyze for a single target framework
135+
roslyn-diff diff old.cs new.cs -t net8.0
136+
137+
# Analyze multiple target frameworks (repeatable flag)
138+
roslyn-diff diff old.cs new.cs -t net8.0 -t net10.0
139+
140+
# Analyze multiple TFMs (semicolon-separated)
141+
roslyn-diff diff old.cs new.cs -T "net8.0;net10.0"
142+
143+
# Multi-TFM with JSON output
144+
roslyn-diff diff old.cs new.cs -t net8.0 -t net10.0 --json
145+
146+
# Multi-TFM with HTML report
147+
roslyn-diff diff old.cs new.cs -T "net8.0;net9.0;net10.0" --html report.html --open
148+
```
149+
118150
### Compare Specific Classes
119151

120152
```bash
@@ -175,6 +207,12 @@ roslyn-diff diff <old-file> <new-file> [options]
175207
| `--whitespace-mode <mode>` | | Whitespace handling: `exact`, `ignore-leading-trailing`, `ignore-all`, `language-aware` | `exact` |
176208
| `--ignore-whitespace` | `-w` | Shortcut for `--whitespace-mode ignore-all` | `false` |
177209

210+
**Multi-TFM Options (v0.9.0):**
211+
| Option | Short | Description | Default |
212+
|--------|-------|-------------|---------|
213+
| `--target-framework <tfm>` | `-t` | Target framework moniker (repeatable: `-t net8.0 -t net10.0`) | `null` (NET10_0 assumed) |
214+
| `--target-frameworks <tfms>` | `-T` | Semicolon-separated TFMs (e.g., `"net8.0;net10.0"`) | `null` |
215+
178216
**Diff Mode Options:**
179217
| Option | Short | Description | Default |
180218
|--------|-------|-------------|---------|
@@ -246,11 +284,13 @@ roslyn-diff diff old.cs new.cs --json analysis.json
246284
{
247285
"$schema": "roslyn-diff-output-v2",
248286
"metadata": {
249-
"version": "0.8.0",
287+
"version": "0.9.0",
250288
"timestamp": "2026-01-19T22:45:12Z",
251289
"mode": "roslyn",
290+
"analyzedTfms": ["net8.0", "net10.0"],
252291
"options": {
253-
"includeNonImpactful": false
292+
"includeNonImpactful": false,
293+
"targetFrameworks": ["net8.0", "net10.0"]
254294
}
255295
},
256296
"summary": {
@@ -272,6 +312,7 @@ roslyn-diff diff old.cs new.cs --json analysis.json
272312
"name": "Process",
273313
"impact": "breakingPublicApi",
274314
"visibility": "public",
315+
"applicableToTfms": ["net8.0", "net10.0"],
275316
"caveats": ["Parameter rename may break callers using named arguments"]
276317
}]
277318
}]
@@ -284,6 +325,7 @@ See [Output Formats Guide](docs/output-formats.md) for complete schema documenta
284325

285326
Interactive HTML report with:
286327
- **Impact classification badges** - Color-coded indicators (Breaking Public API, Breaking Internal API, Non-Breaking, Formatting Only)
328+
- **TFM badges** - Framework-specific indicators (net8.0, net10.0) showing which TFMs each change applies to
287329
- **Caveat warnings** - Yellow warning boxes for edge cases (e.g., "Parameter rename may break named arguments")
288330
- **Whitespace issue indicators** - Warnings for indentation changes, mixed tabs/spaces, etc.
289331
- Side-by-side diff view with syntax highlighting
@@ -313,13 +355,14 @@ roslyn-diff diff old.cs new.cs --text
313355
```
314356
Diff: old.cs -> new.cs
315357
Mode: Roslyn (semantic)
358+
Target Frameworks: net8.0, net10.0
316359
317360
Summary: +2 (2 total changes)
318361
319362
Changes:
320363
File: new.cs
321-
[+] Method: Multiply (line 5-8)
322-
[+] Method: Divide (line 10-13)
364+
[+] Method: Multiply (line 5-8) [net8.0, net10.0]
365+
[+] Method: Divide (line 10-13) [net8.0, net10.0]
323366
```
324367

325368
### Git Unified Diff (`--git`)
@@ -525,6 +568,7 @@ See the [Synaptic Canvas documentation](https://github.com/randlee/synaptic-canv
525568

526569
- **[Impact Classification Guide](docs/impact-classification.md)** - Complete guide to impact levels, filtering, caveats, and use cases (v0.7.0)
527570
- **[Whitespace Handling Guide](docs/whitespace-handling.md)** - Whitespace modes, language-aware detection, and best practices (v0.8.0)
571+
- **[Multi-TFM Support Guide](docs/tfm-support.md)** - Multi-target framework analysis, conditional compilation detection, and advanced scenarios (v0.9.0)
528572
- [Output Formats](docs/output-formats.md) - Format specifications, JSON Schema v2, and feature comparison
529573
- [Sample Outputs](samples/README.md) - Example diffs with impact classification
530574

0 commit comments

Comments
 (0)