Skip to content

Commit 9273333

Browse files
Code Rabbit (#126)
* added .coderabbit.yqml * Update .coderabbit.yaml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent d9f363b commit 9273333

1 file changed

Lines changed: 119 additions & 0 deletions

File tree

.coderabbit.yaml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# yaml-language-server: $schema=https://storage.googleapis.com/coderabbit_public_assets/schema.v2.json
2+
3+
language: en-US
4+
early_access: false
5+
tone_instructions: >
6+
Be concise and technical. Focus on correctness, memory safety, and API
7+
contract violations over style nitpicks (style is enforced by clang-format
8+
and CI, not review).
9+
10+
reviews:
11+
profile: chill
12+
request_changes_workflow: false
13+
high_level_summary: true
14+
poem: false
15+
review_status: true
16+
collapse_walkthrough: true
17+
sequence_diagrams: true
18+
changed_files_summary: true
19+
auto_review:
20+
enabled: true
21+
drafts: false
22+
23+
path_filters:
24+
- "!**/*.md"
25+
- "!docs/**"
26+
- "!build/**"
27+
- "!**/CMakeLists.txt.user"
28+
- "!conan_toolchain.cmake"
29+
30+
path_instructions:
31+
- path: "src/**/*.{hpp,cpp}"
32+
instructions: >
33+
This is the core cwt-cucumber interpreter library (scanner, lexer,
34+
parser, step_finder, test_runner, registry). Apply these project
35+
conventions strictly:
36+
- Allman braces, 2-space indent (Google base style per .clang-format).
37+
- [[nodiscard]] on every function returning a value that must be used.
38+
- noexcept on getters and functions with no failure path.
39+
- const references for read-only parameters; std::string_view for
40+
read-only string params, std::string for stored values.
41+
- No raw owning pointers — require std::unique_ptr or value semantics.
42+
- Use std::format for string formatting; flag any printf/ostringstream.
43+
- Route all output through cuke::log::info/cuke::log::error, never
44+
std::cout/std::cerr directly.
45+
- Flag any change from std::regex_match back to std::regex_search in
46+
step_finder.cpp — regex_search with (.*) patterns in a while loop
47+
causes infinite loops on empty suffixes.
48+
- Built-in cucumber expressions (registry.hpp m_expressions.standard)
49+
must have exactly one capturing group; multi-group patterns belong
50+
in CUSTOM_PARAMETER instead. Verify param_info offset arithmetic
51+
(offset += value_count - 1) stays consistent if this is touched.
52+
- Expressions must use ([^\s]*) / (.*) — not ([^\s]+) / (.+) — so
53+
empty-value cells in Scenario Outlines still match.
54+
- step_finder must remain stateless — flag any added state that
55+
persists across calls.
56+
- No new mandatory third-party dependencies (nlohmann_json stays
57+
optional behind WITH_JSON).
58+
59+
- path: "src/identifiers/**"
60+
instructions: >
61+
Keyword tables map Gherkin tokens to token_type. Check that more
62+
specific/longer keywords are ordered before shorter keywords sharing
63+
a prefix (to avoid false-positive matches), and that array sizes
64+
match the actual number of entries.
65+
66+
- path: "gtest/**"
67+
instructions: >
68+
Unit tests using Google Test. Check that new .cc files are registered
69+
in gtest/CMakeLists.txt's add_executable list. Prefer the two
70+
established patterns: pure-logic tests (parser/step_finder/scanner
71+
without registry) and full scenario tests via
72+
cuke::parser::parse_script + cuke::test_runner with
73+
cuke::registry().clear() in SetUp to avoid cross-test leakage.
74+
75+
- path: "stress-tests/**"
76+
instructions: >
77+
End-to-end edge-case scenarios (.feature files + step_definition.cpp)
78+
exercising the full pipeline. Verify new scenarios use
79+
cuke::is_true/cuke::equal for assertions and that step text has no
80+
unmatched/undefined steps given
81+
CUCUMBER_UNDEFINED_STEPS_ARE_A_FAILURE.
82+
83+
- path: "examples/**"
84+
instructions: >
85+
Documentation-oriented example features and step definitions used as
86+
a CI smoke test. Keep examples simple and idiomatic since they double
87+
as user-facing documentation of the public API (GIVEN/WHEN/THEN,
88+
CUKE_ARG, CUKE_TABLE, CUKE_DOC_STRING, cuke::context).
89+
90+
- path: "**/CMakeLists.txt"
91+
instructions: >
92+
Verify new source files are added to the correct target's source
93+
list and that no new mandatory dependencies are introduced without
94+
matching updates to the Conan recipe.
95+
96+
- path: ".github/workflows/**"
97+
instructions: >
98+
CI must keep testing Linux (GCC 13 + Clang 17), Windows, and macOS.
99+
Flag any change that silently narrows platform/compiler coverage.
100+
101+
abort_on_close: true
102+
103+
tools:
104+
clang:
105+
enabled: true
106+
107+
chat:
108+
auto_reply: true
109+
110+
knowledge_base:
111+
learnings:
112+
scope: auto
113+
issues:
114+
scope: auto
115+
code_guidelines:
116+
filePatterns:
117+
- "AGENTS.md"
118+
- ".clang-format"
119+
enabled: true

0 commit comments

Comments
 (0)