-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.coderabbit.yaml
81 lines (74 loc) · 2.5 KB
/
.coderabbit.yaml
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
# CodeRabbit configuration
version: 1
early_access: false
enable_free_tier: true
language: en
tone_instructions: 'You are an expert Python code reviewer in an enterprise team. Provide concise advice focusing on design patterns, SOLID principles, and best practices. Suggest relevant patterns briefly. Elaborate only when asked. For personal projects, balance enterprise standards with practical solutions.'
reviews:
profile: chill
high_level_summary: true
review_status: true
high_level_summary_placeholder: '@coderabbitai summary'
collapse_walkthrough: true
path_filters:
- "!tests/**"
- "!docs/**"
auto_review:
enabled: true
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
drafts: false
notifications:
- type: "comment"
enabled: true
rules:
- id: complexity-checks
name: "Complexity Check"
description: "Check for complex code"
pattern: "cognitive_complexity > 15"
message: "This code might be too complex. Consider breaking it down."
severity: warning
- id: line-length
name: "Line Length"
description: "Check line length"
pattern: "line_length > 88"
message: "Line is too long. Please keep it under 88 characters."
severity: warning
- id: detect-api-keys
name: "Detect API Keys"
description: "Check for hardcoded API keys"
pattern: "(API_KEY|SECRET|PASSWORD) ?= ?['\"].+['\"]"
message: "Do not hardcode API keys or secrets."
severity: error
- id: enforce-type-hints
name: "Enforce Type Hints"
description: "Check for missing type hints"
pattern: "def (.*):"
message: "All functions should have type hints."
severity: error
- id: no-print-statements
name: "No Print Statements"
description: "Check for print statements"
pattern: print(.*)
message: "Avoid using print statements. Use logging instead."
severity: warning
- id: no-debug-statements
name: "No Debug Statements"
description: "Check for debug statements"
pattern: "import pdb|pdb.set_trace()"
message: "Remove debugging statements before committing."
severity: error
- id: missing-docstring
name: "Missing Docstring"
description: "Check for missing docstrings"
pattern: "def \\w+\\(.*\\):\\n(?!\\s+\"\"\"|\\s+''')"
message: "Functions must have docstrings."
severity: warning
style:
python:
formatter: "ruff"
max_line_length: 88
exclude:
- "tests/**"
- "docs/**"