-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
74 lines (68 loc) · 2.32 KB
/
Copy path.coderabbit.yaml
File metadata and controls
74 lines (68 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: en-US
early_access: false
tone_instructions: |
Review concisely and constructively.
Make the rationale for each comment explicit (PHP version dependencies, type safety, Result type invariants, etc.).
reviews:
profile: assertive
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: true
base_branches:
- main
path_filters:
- "!vendor/**"
- "!**/*.lock"
- "!.phpunit.result.cache"
- "!.php-cs-fixer.cache"
- "!.phpstan/**"
path_instructions:
- path: "src/**/*.php"
instructions: |
- Review assuming PHP 8.4+ syntax and features.
- Respect the API design modeled after Rust's Result<T, E>, and check that the Ok / Err / Result invariants are not broken.
- Prefer explicit error handling via the Result type over implicit error propagation through exceptions.
- Check for thorough use of readonly / final / type declarations (return, parameter, and property types).
- Explicitly point out any breaking changes to the public API.
- path: "tests/**/*.php"
instructions: |
- As PHPUnit tests, check whether they follow t-wada-style TDD's Red→Green→Refactor.
- Without over-adhering to one-assertion-per-test dogma, check that they verify behavior units.
- Check that edge cases are covered (both Ok/Err, nesting, combinators such as map/and_then).
- path: "**/*.md"
instructions: |
- Check that sample code is runnable on PHP 8.4+.
- Check that the README's API descriptions match the implementation in src.
- path: ".github/workflows/**"
instructions: |
- Check that the actions used are version-pinned (by SHA or an explicit tag).
- Check for any improper handling of secrets.
tools:
phpstan:
enabled: true
level: default
phpmd:
enabled: false
github-checks:
enabled: true
timeout_ms: 90000
languagetool:
enabled: true
enabled_only: false
level: default
markdownlint:
enabled: true
yamllint:
enabled: true
actionlint:
enabled: true
gitleaks:
enabled: true
chat:
auto_reply: true