1+ # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+ # https://docs.coderabbit.ai/getting-started/configure-coderabbit
3+
14# CodeRabbit Configuration
25# Optimized for .NET 8 / ASP.NET Core Web API project
36
47language : en-US
58early_access : true
6- enable_free_tier : true
79
810reviews :
911 profile : chill
@@ -23,12 +25,9 @@ reviews:
2325 suggested_labels : true
2426 auto_apply_labels : false
2527 suggested_reviewers : false
26- auto_assign_reviewers : false
27- in_progress_fortune : true
2828 poem : false
2929 abort_on_close : true
3030
31- # Path-based review instructions for this .NET project
3231 path_instructions :
3332 - path : " **/*.cs"
3433 instructions : |
@@ -107,7 +106,6 @@ reviews:
107106 - Ensure package versions are up to date
108107 - Validate that ImplicitUsings is enabled
109108
110- # Ignore patterns for this project
111109 path_filters :
112110 - " !**/bin/**"
113111 - " !**/obj/**"
@@ -138,47 +136,112 @@ reviews:
138136 enabled : true
139137 unit_tests :
140138 enabled : true
139+ custom :
140+ - name : " sync documentation"
141+ instructions : |
142+ This is a PoC/learning project targeting developers unfamiliar with the stack.
143+ Documentation is a first-class concern. Review the PR changes and perform the
144+ following three checks:
145+
146+ ## 1. Method/function docstrings
147+ For every public function, method, or handler touched in the PR:
148+ - If it lacks a docstring/doc comment, add one using the idiomatic format
149+ for the language and framework in use.
150+ - If it has one but no longer matches the current signature, parameters,
151+ or behavior, update it.
152+ - Docstrings should explain *why* and *what*, not just restate the signature.
153+ Assume the reader is learning the language.
154+
155+ ## 2. README.md
156+ Check whether the PR introduces or removes endpoints, changes behavior,
157+ adds dependencies, or modifies how to run the project.
158+ If so, update the relevant sections of README.md to reflect the current state.
159+ Do not rewrite sections unrelated to the changes.
160+
161+ ## 3. .github/copilot-instructions.md
162+ If the PR introduces patterns, conventions, or architectural decisions that
163+ should guide future AI-assisted contributions, add or update the relevant
164+ instructions in .github/copilot-instructions.md.
165+ Focus on things a developer (or AI assistant) unfamiliar with this specific
166+ stack implementation should know before writing code here.
167+
168+ - name : " enforce http error handling"
169+ instructions : |
170+ Audit all HTTP handler functions in the changed files.
171+ Ensure errors return appropriate HTTP status codes (400 for bad input,
172+ 404 for not found, 500 for unexpected errors) and a consistent JSON error
173+ body with at least a "message" field.
174+ Flag handlers that return 200 on error or swallow errors silently.
175+ Use idiomatic error handling patterns for the language and framework in use.
176+
177+ - name : " idiomatic review"
178+ instructions : |
179+ Review the changed files for non-idiomatic patterns given the language and
180+ framework in use. Flag code that looks like it was translated from another
181+ language rather than written naturally for this stack. Suggest idiomatic
182+ alternatives with brief explanations. This is a PoC comparison project,
183+ so idiomatic usage is a first-class concern.
184+
185+ - name : " verify api contract"
186+ instructions : |
187+ Review the changed files and verify that all HTTP endpoints (method, path,
188+ request body shape, and response shape) match the project's intended REST API
189+ contract. Check the README or any spec/contract file in the repo for reference.
190+ Flag any deviations — missing fields, wrong status codes, inconsistent naming.
191+ Do not make changes; only report findings as a comment.
141192
142193 pre_merge_checks :
143194 docstrings :
144195 mode : warning
145- threshold : 75
196+ threshold : 80
146197 title :
147198 mode : warning
148199 requirements : |
149200 - Use Conventional Commits format (feat:, fix:, chore:, docs:, test:, refactor:)
150201 - Keep under 80 characters
151202 - Be descriptive and specific
152203 description :
153- mode : warning
204+ mode : off
154205 issue_assessment :
155- mode : warning
206+ mode : off
156207
157208 tools :
158- # Relevant tools for .NET/C# projects
209+ # Secret scanners
159210 gitleaks :
160211 enabled : true
212+ trufflehog :
213+ enabled : true
214+
215+ # IaC / infrastructure
161216 checkov :
162217 enabled : true
218+ trivy :
219+ enabled : true
163220 hadolint :
164221 enabled : true
222+
223+ # General static analysis
224+ semgrep :
225+ enabled : true
226+ opengrep :
227+ enabled : true
228+
229+ # File-type linters
165230 yamllint :
166231 enabled : true
167232 actionlint :
168233 enabled : true
169- semgrep :
170- enabled : true
171234 markdownlint :
172235 enabled : true
173- github-checks :
174- enabled : true
175- timeout_ms : 120000
176236 dotenvLint :
177237 enabled : true
178238 checkmake :
179239 enabled : true
180240 osvScanner :
181241 enabled : true
242+ github-checks :
243+ enabled : true
244+ timeout_ms : 120000
182245
183246 # Disable irrelevant tools for this .NET project
184247 shellcheck :
@@ -203,6 +266,8 @@ reviews:
203266 enabled : false
204267 flake8 :
205268 enabled : false
269+ pylint :
270+ enabled : false
206271 rubocop :
207272 enabled : false
208273 buf :
@@ -221,8 +286,6 @@ reviews:
221286 enabled : false
222287 prismaLint :
223288 enabled : false
224- pylint :
225- enabled : false
226289 oxc :
227290 enabled : false
228291 shopifyThemeCheck :
@@ -237,6 +300,14 @@ reviews:
237300 enabled : false
238301 circleci :
239302 enabled : false
303+ fortitudeLint :
304+ enabled : false
305+ stylelint :
306+ enabled : false
307+ blinter :
308+ enabled : false
309+ psscriptanalyzer :
310+ enabled : false
240311
241312chat :
242313 art : true
@@ -249,12 +320,7 @@ knowledge_base:
249320 code_guidelines :
250321 enabled : true
251322 filePatterns :
252- - " **/*.cs"
253- - " **/*.csproj"
254- - " **/Dockerfile"
255- - " **/*.{yml,yaml}"
256- - " **/appsettings*.json"
257- - " src/**/*.json"
323+ - " .github/copilot-instructions.md"
258324 learnings :
259325 scope : auto
260326 issues :
0 commit comments