Skip to content

Commit 22c74bd

Browse files
nanotaboadaclaude
andcommitted
docs: sync README, CHANGELOG, and CodeRabbit config with current codebase state
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9c2df9e commit 22c74bd

4 files changed

Lines changed: 31 additions & 14 deletions

File tree

β€Ž.coderabbit.yamlβ€Ž

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://docs.coderabbit.ai/getting-started/configure-coderabbit
33

44
# CodeRabbit Configuration
5-
# Optimized for .NET 8 / ASP.NET Core Web API project
5+
# Optimized for .NET 10 / ASP.NET Core Web API project
66

77
language: en-US
88
early_access: true
@@ -80,16 +80,18 @@ reviews:
8080
- path: "test/**/*.cs"
8181
instructions: |
8282
- Tests should use xUnit, Moq, and FluentAssertions
83-
- Verify test naming follows Given_When_Then pattern
83+
- Verify test naming follows the two-pattern convention (exactly 3 underscore-delimited segments):
84+
- Controller tests: {HttpMethod}_{Resource}_{Condition}_Returns{Outcome} (e.g. Get_Players_Existing_ReturnsPlayers)
85+
- Service/Validator tests: {MethodName}_{StateUnderTest}_{ExpectedBehavior} (e.g. RetrieveAsync_CacheMiss_QueriesRepositoryAndCachesResult)
8486
- Check that mocks are properly configured
8587
- Ensure async tests use Task return type
86-
- Validate test data uses faker patterns
88+
- Validate test data uses PlayerFakes factory methods from test/Utilities/
8789
- Tests should use [Fact] and [Theory] attributes with [Trait("Category", "Unit")]
8890
8991
- path: "**/Dockerfile"
9092
instructions: |
9193
- Verify multi-stage builds are used
92-
- Check that .NET 8 SDK and runtime versions match
94+
- Check that .NET 10 SDK and runtime versions match
9395
- Ensure non-root user is used for security
9496
- Validate HEALTHCHECK instruction is present
9597
@@ -101,7 +103,7 @@ reviews:
101103
102104
- path: "**/*.csproj"
103105
instructions: |
104-
- Verify .NET 8 (net8.0) target framework
106+
- Verify .NET 10 (net10.0) target framework
105107
- Check that nullable reference types are enabled
106108
- Ensure package versions are up to date
107109
- Validate that ImplicitUsings is enabled
@@ -345,7 +347,9 @@ code_generation:
345347
- path: "test/**/*.cs"
346348
instructions: |
347349
- Use xUnit framework with [Fact] and [Theory] attributes
348-
- Follow Given_When_Then naming pattern for test methods
350+
- Follow the two-pattern naming convention (exactly 3 underscore-delimited segments):
351+
- Controller tests: {HttpMethod}_{Resource}_{Condition}_Returns{Outcome}
352+
- Service/Validator tests: {MethodName}_{StateUnderTest}_{ExpectedBehavior}
349353
- Use [Trait("Category", "Unit")] attribute for all unit tests
350354
- Use Moq for mocking dependencies
351355
- Use FluentAssertions for readable assertions

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ logs/
22
bin/
33
obj/
44
TestResults/
5+
.claude/settings.local.json

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,16 @@ This project uses famous football stadiums (A-Z) that hosted FIFA World Cup matc
4444

4545
### Added
4646

47+
- Add SonarCloud configuration via `sonar-project.properties` with CPD exclusions for test files and `PlayerRequestModelValidator` (#426)
48+
- Add bug report issue template (`.github/ISSUE_TEMPLATE/bug_report.md`) (#426)
49+
4750
### Changed
4851

49-
### Deprecated
50-
51-
### Removed
52+
- Bump `codecov/codecov-action` from 5.5.2 to 5.5.3 (#423)
5253

5354
### Fixed
5455

55-
### Security
56+
- Scope `BeUniqueSquadNumber` validator to `"Create"` rule set to prevent false rejection of valid `PUT` requests (#424)
5657

5758
---
5859

@@ -195,6 +196,7 @@ The CD workflow automatically:
195196

196197
---
197198

198-
[unreleased]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.1.0-bernabeu...HEAD
199+
[unreleased]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v2.0.0-centenario...HEAD
200+
[2.0.0 - centenario]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.1.0-bernabeu...v2.0.0-centenario
199201
[1.1.0 - bernabeu]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.0.0-azteca...v1.1.0-bernabeu
200202
[1.0.0 - azteca]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/releases/tag/v1.0.0-azteca

β€ŽREADME.mdβ€Ž

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![codecov](https://codecov.io/gh/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/graph/badge.svg?token=hgJc1rStJ9)](https://codecov.io/gh/nanotaboada/Dotnet.Samples.AspNetCore.WebApi)
88
[![CodeFactor](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/badge)](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi)
99
[![License: MIT](https://img.shields.io/badge/License-MIT-3DA639.svg)](https://opensource.org/licenses/MIT)
10+
![Dependabot](https://img.shields.io/badge/Dependabot-contributing-025E8C?logo=dependabot&logoColor=white&labelColor=181818)
1011
![GitHub Copilot](https://img.shields.io/badge/GitHub_Copilot-contributing-8662C5?logo=githubcopilot&logoColor=white&labelColor=181818)
1112
![Claude](https://img.shields.io/badge/Claude-Sonnet_4.6-D97757?logo=claude&logoColor=white&labelColor=181818)
1213
![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi?utm_source=oss&utm_medium=github&utm_campaign=nanotaboada%2FDotnet.Samples.AspNetCore.WebApi&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews&labelColor=181818)
@@ -82,15 +83,23 @@ src/Dotnet.Samples.AspNetCore.WebApi/
8283
β”œβ”€β”€ Validators/ # FluentValidation rules
8384
β”‚ └── PlayerRequestModelValidator.cs
8485
β”œβ”€β”€ Configurations/ # Swagger, rate limiting config
86+
β”œβ”€β”€ Enums/ # Domain enumerations (e.g. Position)
8587
β”œβ”€β”€ Extensions/ # Service registration extensions
88+
β”œβ”€β”€ Middlewares/ # Custom ASP.NET Core middleware
8689
β”œβ”€β”€ Utilities/ # Helper classes
8790
β”œβ”€β”€ Migrations/ # EF Core migrations
8891
└── storage/ # Pre-seeded SQLite database
8992
9093
test/Dotnet.Samples.AspNetCore.WebApi.Tests/
91-
└── Unit/ # Unit tests with xUnit
92-
β”œβ”€β”€ PlayerControllerTests.cs
93-
└── PlayerServiceTests.cs
94+
β”œβ”€β”€ Unit/ # Unit tests with xUnit
95+
β”‚ β”œβ”€β”€ PlayerControllerTests.cs
96+
β”‚ β”œβ”€β”€ PlayerServiceTests.cs
97+
β”‚ └── PlayerValidatorTests.cs
98+
└── Utilities/ # Shared test helpers
99+
β”œβ”€β”€ DatabaseFakes.cs
100+
β”œβ”€β”€ PlayerFakes.cs
101+
β”œβ”€β”€ PlayerMocks.cs
102+
└── PlayerStubs.cs
94103
```
95104

96105
## Architecture
@@ -421,6 +430,7 @@ STORAGE_PATH=/storage/players-sqlite3.db
421430
| `dotnet build` | Build the solution |
422431
| `dotnet test` | Run all tests |
423432
| `dotnet test --collect:"XPlat Code Coverage"` | Run tests with coverage report |
433+
| `dotnet csharpier .` | Format source code |
424434
| `dotnet ef migrations add <Name>` | Create a new migration |
425435
| `dotnet ef database update` | Apply migrations |
426436
| `./scripts/run-migrations-and-copy-database.sh` | Regenerate database with seed data |

0 commit comments

Comments
Β (0)