-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
100 lines (87 loc) · 2.7 KB
/
Copy path.coderabbit.yaml
File metadata and controls
100 lines (87 loc) · 2.7 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# Template React/Vite/TS + Supabase
language: "pt-BR"
tone_instructions: "Assertivo. Bugs, segurança e performance. pt-BR, hífens, sem em-dashes."
# 68 chars
early_access: false
reviews:
profile: "assertive"
request_changes_workflow: true
high_level_summary: true
review_status: true
poem: false
sequence_diagrams: true
estimate_code_review_effort: true
auto_review:
enabled: true
drafts: false
base_branches:
- main
path_instructions:
- path: "src/**/*.{ts,tsx,js,jsx}"
instructions: |
TypeScript/React. Verificar:
- Sem uso de `any` sem justificativa.
- Hooks usados corretamente (dependências em useEffect, cleanup em subscriptions).
- Props com tipos explícitos, sem PropTypes implícitos.
- Não renderizar dados não sanitizados via dangerouslySetInnerHTML.
- Estados de erro e loading tratados explicitamente (não só happy path).
- path: "src/services/**"
instructions: |
Camada de serviço. Verificar:
- Chamadas de API com tratamento de erro explícito.
- Tokens/credenciais nunca logados ou expostos em respostas de erro.
- Retry com backoff em endpoints críticos.
- path: "supabase/**"
instructions: |
Supabase: RLS habilitado em todas as tabelas com dados de usuário, policies com
user_id = auth.uid(), migrations idempotentes, índices em colunas de filtro.
Nunca chamar supabase.auth.admin sem verificação de papel admin.
- path: ".github/workflows/**"
instructions: |
CI/CD: secrets via secrets.*, nunca hardcoded. Permissions mínimas. Actions
pinadas por SHA quando possível. Concurrency control pra evitar runs duplicados.
- path: "**/.env.example"
instructions: |
Apenas placeholders, NUNCA valores reais. Sem project-refs reais do Supabase.
path_filters:
- "!**/node_modules/**"
- "!**/dist/**"
- "!**/build/**"
- "!**/*.min.js"
- "!**/*.min.css"
- "!**/*.lock"
- "!**/package-lock.json"
- "!**/pnpm-lock.yaml"
- "!**/*.snap"
- "!**/*.png"
- "!**/*.jpg"
- "!**/*.jpeg"
- "!**/*.gif"
- "!**/*.ico"
- "!**/*.svg"
- "!**/*.webp"
- "!**/*.woff"
- "!**/*.woff2"
- "!**/*.ttf"
- "!**/*.pdf"
- "!.coderabbit.yaml"
tools:
gitleaks:
enabled: true
semgrep:
enabled: true
presidio:
enabled: true
knowledge_base:
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns:
- ".github/copilot-instructions.md"
- "AGENTS.md"
learnings:
scope: "local"
chat:
auto_reply: true