Remove (non-functional) outer class support entirely - #326
Conversation
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds analyzer rule ChangesRoute group nesting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RoslynCompiler
participant RouteGroupClassAnalyzer
participant Diagnostic
RoslynCompiler->>RouteGroupClassAnalyzer: Analyze named type symbol
RouteGroupClassAnalyzer->>RouteGroupClassAnalyzer: Check route-group attribute and containing type
RouteGroupClassAnalyzer->>Diagnostic: Report IAPI0014 at nested type
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
tests/Immediate.Apis.Tests/AnalyzerTests/RouteGroupClassAnalyzerTests.cs (1)
26-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAlign the test name with the case it covers.
Inneris nested insideOuter, so this verifies that route groups may nest inside other route groups—not a non-nested route group. Rename the test accordingly and add a separate top-level case if you intend to cover theContainingType is nullpath.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/Immediate.Apis.Tests/AnalyzerTests/RouteGroupClassAnalyzerTests.cs` around lines 26 - 44, Rename NonNestedRouteGroupShouldNotError to reflect that it verifies nested route groups are accepted. Add a separate analyzer test with a top-level route group if coverage of the ContainingType-null path is required.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/Immediate.Apis.Analyzers/AnalyzerReleases.Shipped.md`:
- Around line 52-55: Insert a blank line between the “### New Rules” heading and
the rules table in AnalyzerReleases.Shipped.md so the markdown satisfies MD058.
Keep the table contents unchanged.
In `@src/Immediate.Apis.Generators/ImmediateApisGenerator.Render.cs`:
- Around line 81-82: Update the source filename construction in the generator
method containing context.AddSource so a null or absent
group.Definition.Namespace omits the namespace separator, producing IA.Root.g.cs
for global-namespace route groups while preserving the existing
namespace-qualified naming.
---
Nitpick comments:
In `@tests/Immediate.Apis.Tests/AnalyzerTests/RouteGroupClassAnalyzerTests.cs`:
- Around line 26-44: Rename NonNestedRouteGroupShouldNotError to reflect that it
verifies nested route groups are accepted. Add a separate analyzer test with a
top-level route group if coverage of the ContainingType-null path is required.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9f572d62-1364-4947-8dc5-f8bf02472ff9
📒 Files selected for processing (11)
src/Immediate.Apis.Analyzers/AnalyzerReleases.Shipped.mdsrc/Immediate.Apis.Analyzers/DiagnosticIds.cssrc/Immediate.Apis.Analyzers/RouteGroupClassAnalyzer.cssrc/Immediate.Apis.Generators/ImmediateApisGenerator.Models.cssrc/Immediate.Apis.Generators/ImmediateApisGenerator.Render.cssrc/Immediate.Apis.Generators/ImmediateApisGenerator.Transform.cssrc/Immediate.Apis.Generators/Templates/RouteGroup.sbntxttests/Immediate.Apis.Tests/AnalyzerTests/RouteGroupClassAnalyzerTests.cstests/Immediate.Apis.Tests/GeneratorTests/RouteGroupTests.cstests/Immediate.Apis.Tests/GeneratorTests/Snapshots/RouteGroupTests.SimpleRouteGroupTest#IA.Dummy.Root.g.verified.cstests/Immediate.Apis.Tests/GeneratorTests/Snapshots/RouteGroupTests.TaggedRouteGroupTest_framework=net10.0#IA.Dummy.Root.g.verified.cs
💤 Files with no reviewable changes (3)
- src/Immediate.Apis.Generators/ImmediateApisGenerator.Models.cs
- src/Immediate.Apis.Generators/ImmediateApisGenerator.Transform.cs
- src/Immediate.Apis.Generators/Templates/RouteGroup.sbntxt
|
@coderabbitai pause |
✅ Action performedReviews paused. |
Fixes #322
Summary by CodeRabbit
New Features
IAPI0014with an error severity for invalid nesting.Bug Fixes
Tests