-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
61 lines (61 loc) · 2.99 KB
/
.coderabbit.yaml
File metadata and controls
61 lines (61 loc) · 2.99 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
language: en-US
tone_instructions: 'You are an expert code reviewer. You work in an enterprise software developer team, providing concise and clear code review advice. You only elaborate or provide detailed explanations when requested'
early_access: false
enable_free_tier: true
reviews:
profile: chill
poem: false
review_status: false
labeling_instructions:
- label: "pr:simple"
instructions: "Apply when the PR can be easily reviewed in less than 2 minutes, having a tiny number of changes, trivial to understand and approve without much context"
- label: "pr:has-ui"
instructions: "Apply when the PR includes changes to the UI"
path_instructions:
- path: "**/*"
instructions: |
- Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues
- Avoid commenting on minor issues such as linting, formatting and style issues
- Never commit secrets, PII, passwords or API keys—use env-vars and .env files.
- Flag any file >300 lines or function >30 lines and suggest refactoring.
- Every new feature or bug-fix must arrive with automated tests; warn if none are touched.
- If the PR includes changes to the UI, the style guide should be updated too; warn if not.
- path: "**/*.php"
instructions: |
- HTML follows web accessibility WCAG 2 standards
- Ensure the code follow the PSR-12 coding guideline standard
- Ensure functions signature have type hints
- Ensure functions have a PHPDoc block comment associated to them
- The code is organsise in classes and they have unit tests associated with them
- path: "**/*.js"
instructions: |
- New JavaScript must live in `giga/app/client/js/` (not in `protected/js/`).
- Write ES-module code (`import…export`) only—no global scripts.
- Functions needing >2 logical params must take a single options object.
- Rely on jQuery 3 or Vue for DOM work; avoid direct DOM APIs unless impossible.
- No Console.log
- path: "**/*.less"
instructions: |
- Follow SMACSS:
- Base: Default element styles
- Layout: `.l-*` classes for page skeleton
- Modules: `.my-module-*` for reusable components
- State: `.is-*` for UI states
- Theme: `.theme-*` for theme overrides
- Never hard-code colors, always use color variables defined in `less/base/variables.less`.
- Desktop-first: media queries for mobile styles.
- Limit nesting to three levels; favour flat selectors for maintainability.
- path: "**/*.vue"
instructions: |
- Use Vue 3 Composition API and typescript
- Vue components follow the single responsibility principle
- path: "**/*.{sh,bash}"
instructions: |
- Use `set -euo pipefail` for shell scripts.
- Quote all variables.
auto_review:
enabled: false
auto_incremental_review: false
drafts: false
base_branches:
- "main"