Skip to content

Commit d704522

Browse files
rnetserclaude
andauthored
fix: enforce # <skip-jira-utils-check> on Jira lines in CodeRabbit config (#5258)
##### What this PR does / why we need it: The project's jira-utils checker validates Jira IDs across the codebase. When test docstrings include `Jira:` lines for traceability (not quarantine/xfail), those references trigger false positives unless they have a `# <skip-jira-utils-check>` inline comment. This PR: 1. Adds a **Jira skip-marker enforcement** instruction to the `.coderabbit.yaml` "STP link required" custom check, so CodeRabbit flags any `Jira:` line in test docstrings that is missing `# <skip-jira-utils-check>` (HIGH severity). Only applies to `Jira:` lines — `STP:` and `RFE:` lines are unaffected. 2. Fixes the one existing violation in `tests/observability/metrics/test_vms_metrics.py`. ##### Which issue(s) this PR fixes: Fixes #5257 ##### Special notes for reviewer: ##### jira-ticket: NONE Co-authored-by: Claude <noreply@anthropic.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated the code review configuration to strengthen documentation/traceability enforcement for newly added test docstrings, specifically requiring a Jira inline “skip” marker when a Jira traceability line is present. * **Documentation** * Added the required Jira skip directive to a test docstring to satisfy the updated traceability rule. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Ruth Netser <rnetser@redhat.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4a3345c commit d704522

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.coderabbit.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ reviews:
121121
newly added test functions in that same file are considered covered.
122122
The @pytest.mark.polarion decorator alone does NOT satisfy this requirement.
123123
124+
**Jira skip-marker enforcement:**
125+
When a `Jira:` line appears in a test docstring for traceability, it MUST
126+
also include `# <skip-jira-utils-check>` as an inline comment on the same line.
127+
This is required so the project's jira-utils checker skips traceability references.
128+
- Correct: `Jira: https://redhat.atlassian.net/browse/CNV-87822 # <skip-jira-utils-check>`
129+
- Incorrect: `Jira: https://redhat.atlassian.net/browse/CNV-80580`
130+
This does NOT apply to `STP:` or `RFE:` lines — only `Jira:` lines need the marker.
131+
Flag a missing `# <skip-jira-utils-check>` on a `Jira:` line as HIGH severity.
132+
124133
Pass if no new test files and no new test functions are added in this PR.
125134
126135
# Auto-review configuration

tests/observability/metrics/test_vms_metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ class TestVmiSyncTotal:
551551
"""
552552
Tests for kubevirt_vmi_sync_total metric.
553553
554-
Jira: https://redhat.atlassian.net/browse/CNV-80580
554+
Jira: https://redhat.atlassian.net/browse/CNV-80580 # <skip-jira-utils-check>
555555
556556
Preconditions:
557557
- Running VM

0 commit comments

Comments
 (0)