-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
196 lines (174 loc) · 6.46 KB
/
.coderabbit.yaml
File metadata and controls
196 lines (174 loc) · 6.46 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# CodeRabbit AI Review Configuration for openshift-virtualization-tests
# Based on project-specific rules from CLAUDE.md
language: en-US
tone_instructions: "Be direct and specific. Explain WHY rules exist. Provide code examples. Distinguish critical violations from suggestions. Use severity levels: CRITICAL (blocking/security), HIGH (types/fixtures), MEDIUM (style), LOW (suggestions)."
early_access: true
enable_free_tier: true
reviews:
# Explicit instructions applied to every review, including PR description validation
path_instructions:
- path: "**"
instructions: |
## PR Template Validation
Check the PR description for required sections from `.github/pull_request_template.md`.
Required sections (must be present, even if empty):
- `##### What this PR does / why we need it:` — MUST be present AND have meaningful content.
Flag as HIGH if the section is missing, empty, whitespace-only, contains only HTML comments,
or contains only placeholder tokens such as `TBD`, `TBA`, `N/A`, `-`, `—`, `none`, or `.`.
- `##### Which issue(s) this PR fixes:` — must be present (may be empty)
- `##### Special notes for reviewer:` — must be present (may be empty)
- `##### jira-ticket:` — must be present (may be empty)
Optional sections (may be omitted without issue):
- `##### Short description:`
- `##### More details:`
If any required section is absent, or `What this PR does / why we need it:` has no content,
flag it as HIGH severity and ask the author to restore the missing template section(s).
# Assertive profile for strict enforcement of coding standards
profile: assertive
# Request changes for critical violations
request_changes_workflow: true
# Review display settings
high_level_summary: true
high_level_summary_placeholder: "@coderabbitai summary"
auto_title_placeholder: "@coderabbitai"
review_status: true
commit_status: true
review_details: true
poem: false
collapse_walkthrough: true
# Auto-suggest labels
labeling_instructions:
- label: "new-tests"
instructions: "Apply when the PR adds new test files (test_*.py) or new test functions (def test_*)."
- label: "docs-only"
instructions: "Apply when the PR only changes .md files."
sequence_diagrams: false
changed_files_summary: true
# Targeted pre-merge checks - only run on changed files
# path_filters: markdown files are reviewed (AGENTS.md, docs/*.md contain coding standards)
path_filters: []
# Abort review if PR is closed
abort_on_close: true
# Pre-merge checks for PR quality
pre_merge_checks:
title:
mode: error
requirements: "Must be under 120 chars and clearly describe the change."
description:
mode: error
custom_checks:
- name: "STP link required"
mode: error
instructions: |
Every new test file (test_*.py) MUST include an STP link in the
module, class, or test docstring. If no STP exists, an RFE or
Jira link is required instead. Fail if a new test file has
neither.
# Auto-review configuration
auto_review:
enabled: true
auto_incremental_review: true
drafts: false
auto_pause_after_reviewed_commits: 10
ignore_title_keywords:
- "WIP"
base_branches:
- main
- cnv-4.21
- cnv-4.20
- cnv-4.19
- cnv-4.18
# Enabled linting and security tools
tools:
# Python linting
ruff:
enabled: true
# Additional Python linting (stricter checks)
pylint:
enabled: true
# Note: mypy is not a supported CodeRabbit tool - type checking is enforced via pre-commit and tox
# YAML validation
yamllint:
enabled: true
# Shell script checking
shellcheck:
enabled: true
# Security scanning
gitleaks:
enabled: true
semgrep:
enabled: true
# GitHub Actions workflow validation
actionlint:
enabled: true
# Dockerfile linting
hadolint:
enabled: true
# Markdown linting
markdownlint:
enabled: true
# GitHub checks integration
github-checks:
enabled: true
timeout_ms: 90000
# Disabled tools (no JS/TS, PHP, Ruby, Kotlin, Rust, or Terraform in this repo)
biome:
enabled: false
eslint:
enabled: false
phpstan:
enabled: false
rubocop:
enabled: false
detekt:
enabled: false
clippy:
enabled: false
checkov:
enabled: false
tflint:
enabled: false
chat:
auto_reply: true
knowledge_base:
opt_out: false
linked_repositories:
# Link to design-docs repo for STP ↔ test traceability
- repository: "RedHatQE/openshift-virtualization-tests-design-docs"
instructions: |
Contains Software Test Plans (STPs) under stps/<sig>/ that define
test requirements, scenarios, and acceptance criteria.
STRICT ENFORCEMENT (applied to STD (Software Test Description)
and test implementation PRs):
- CRITICAL: Every STD PR MUST cover ALL test scenarios from the
referenced STP, except scenarios explicitly excluded with
justification and a follow-up Jira link. Any other missing
scenario blocks merge.
- CRITICAL: Every test MUST link to its STP. The link can be at
module, class, or test level docstring — place it at the level
that applies. Missing or invalid STP links block merge.
- HIGH: STD docstring preconditions, steps, and expected results
MUST align with the STP scenario description.
- HIGH: If an STP scenario is intentionally excluded, the PR
description MUST explain why and include a follow-up Jira link.
- HIGH: Every test scenario defined in the STP must have a
corresponding STD test implementation.
- HIGH: Negative and edge-case scenarios defined in the STP
MUST have corresponding tests — do not skip error paths.
- Partial coverage without justification blocks merge.
# Enable code guidelines enforcement from AGENTS.md (single source of truth)
code_guidelines:
enabled: true
filePatterns:
- "AGENTS.md"
- "docs/AI_CONTRIBUTION_POLICY.md"
# Enable learning from repository patterns
learnings:
scope: auto
# Enable learning from issues
issues:
scope: auto
# Enable learning from pull requests
pull_requests:
scope: auto