Skip to content

Commit 0695eb2

Browse files
committed
chore: allow unnested for loop
1 parent 88a9078 commit 0695eb2

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

AGENTS.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77

88
Before writing **ANY** code, verify:
99

10-
| ❌ VIOLATION | ✅ REQUIRED |
11-
| --------------------------- | ------------------------------------------------- |
12-
| `for (auto x : collection)` | `std::ranges::*` or `collection \| std::views::*` |
13-
| `int foo()` | `auto foo() -> int` |
14-
| `Type x = value` | `auto x = value` |
15-
| `void fn(a, b, c, d, e)` | `void fn(options_struct)` |
16-
17-
**If you write a for-loop over a collection, your code is WRONG. Rewrite with `std::ranges`.**
10+
| ❌ VIOLATION | ✅ REQUIRED |
11+
| ---------------------------------- | ------------------------------------------------- |
12+
| nested `for (auto x : collection)` | `std::ranges::*` or `collection \| std::views::*` |
13+
| `int foo()` | `auto foo() -> int` |
14+
| `Type x = value` | `auto x = value` |
15+
| `void fn(a, b, c, d, e)` | `void fn(options_struct)` |
16+
17+
- **If you write a nested for-loop over a collection, your code is WRONG. Rewrite with `std::ranges`.**
18+
- single, unnested `for (auto x : collection)` loop is OK.
1819

1920
## Coding Convention
2021

0 commit comments

Comments
 (0)