Cursor rule
.cursor/rules/cpp.mdc[object Object]
Cursor rules
Quality
34/100
Scores the file, not the repository.Length
182 words
0 headings · 0 code blocksRepository
180
— · pushed 95 days agoLast changed
3 days ago
First indexed 3 days ago.123456781. prefer one class per file.92. use Google C++ coding styles.103. make classes immutable as much as possible.114. follow guidelines of effective modern c++.121314Name methods (casing, etc) like "is_valid", "stream_text"1516Lean on auto. Let the compiler deduce obvious types and keep code DRY.1718Use nullptr, never 0 or NULL. A unique keyword prevents overload ambiguities and makes pointer intent explicit.1920Express ownership with smart-pointers (std::unique_ptr, std::shared_ptr, std::weak_ptr). Raw pointers say nothing about lifetime.2122Move more, copy less. Pass/return by value when cheap-to-move; use std::move to convey transfer of resources.2324Mark intent with keywords (const, constexpr, noexcept, override, delete). They document guarantees and enable optimisations.2526Prefer brace initialisation. It prevents narrowing, works with std::initializer_list, and unifies syntax.2728Capture carefully in lambdas; avoid default capture ([=], [&]). Explicit captures beat accidental lifetime bugs.2930Think tasks, not threads. Launch work with std::async, std::future, or std::packaged_task; join or detach thoughtfully.3132Use std::atomic for inter-thread data, not volatile. Atomics give ordering guarantees; volatile is for hardware registers.3334Emplace instead of insert / push_back. Construct elements in place to avoid extra moves or copies.
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago | |
| skillrecordings/egghead-next.cursor/rules/gh-task-plan.mdc · 1.4k | Cursor rules | teststylearchtypes+2 | 96/100 | 3 days ago | |
| skillrecordings/egghead-next.cursor/rules/project-update-rules.mdc · 1.4k | Cursor rules | buildtestlint-formatstyle+7 | 96/100 | 3 days ago | |
| skillrecordings/egghead-next.cursor/rules/project-update-user-rules.mdc · 1.4k | Cursor rules | buildtestlint-formatstyle+7 | 96/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126 | Cursor rules | buildlint-formatstylearch+3 | 96/100 | 3 days ago |
