From 0939625580bb752254f8ba778eb4409009e582c5 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Mon, 22 Jun 2026 09:31:54 -0700 Subject: [PATCH] .cursor Signed-off-by: James Cherry --- .cursor/rules/cpp-coding-standards.mdc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.cursor/rules/cpp-coding-standards.mdc b/.cursor/rules/cpp-coding-standards.mdc index fc06afdf..4589e5b3 100644 --- a/.cursor/rules/cpp-coding-standards.mdc +++ b/.cursor/rules/cpp-coding-standards.mdc @@ -34,6 +34,13 @@ alwaysApply: true - Prefer `std::string` over `char*` for string members. - Prefer pass-by-value and move for sink parameters (parameters that get stored). +## Control flow + +- Prefer positive `if` conditions that wrap the main logic instead of early + `continue` or `return` to skip work. +- Example: use `if (!visited.contains(vertex)) { ... }` rather than + `if (visited.contains(vertex)) continue;`. + ## File Extensions - C++ source: `.cc`