Skip to content

Commit 957fb83

Browse files
nanotaboadaclaude
andcommitted
chore(coderabbit): add path instructions for Mappings, Middlewares, Extensions (#435)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 62935e6 commit 957fb83

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.coderabbit.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,28 @@ reviews:
7777
- Ensure error messages are descriptive
7878
- Verify validators are registered in DI container
7979
80+
- path: "src/**/Mappings/**/*.cs"
81+
instructions: |
82+
- Profiles should inherit from AutoMapper Profile
83+
- Verify CreateMap<Source, Destination>() calls cover all DTOs in use
84+
- Check reverse mappings are defined where bidirectional mapping is needed
85+
- Ensure profiles are registered via AddAutoMapper() in the DI setup
86+
- Flag any manual property mappings that could be replaced by convention
87+
88+
- path: "src/**/Middlewares/**/*.cs"
89+
instructions: |
90+
- Middleware must implement InvokeAsync(HttpContext context) signature
91+
- Verify _next(context) is called unless the middleware intentionally short-circuits
92+
- Ensure exceptions are not swallowed — rethrow or translate to Problem Details
93+
- Middleware should be stateless; dependencies requiring request scope belong in services
94+
95+
- path: "src/**/Extensions/**/*.cs"
96+
instructions: |
97+
- Extension methods should target IServiceCollection and return IServiceCollection
98+
- Each method should encapsulate a single registration concern
99+
- Verify service lifetimes (Singleton/Scoped/Transient) match the dependency's usage
100+
- Follow the Add{Feature} naming convention (e.g. AddPlayerServices, AddRateLimiting)
101+
80102
- path: "test/**/*.cs"
81103
instructions: |
82104
- Tests should use xUnit, Moq, and FluentAssertions

0 commit comments

Comments
 (0)