Files
athena/chezmoi/dot_claude/rules/ecc/cpp/coding-style.md
T
Зарубин Филипп f219b1fc67 feat: Athena OS Фаза 2 — generic chezmoi-канон Мозга
chezmoi-source (чистая пересборка, не дамп 1.2 ГБ):
- dot_claude: CLAUDE.md лин-роутер, AGENTS.md.tmpl (VPS вычищен),
  settings.json.tmpl (deny-щит 20 + security-guard hook), rules
  (structure + ECC 21 язык), 30 generic ECC-агентов, health-check
- dot_codex: symlink-паритет; dot_agents: registry 13 скриптов
  HOME-генерик + методология docs
- плагины: plugins.manifest + bootstrap Слой 1b (marketplace+install)
- launchd: health.plist (PATH-фикс 127) + session-reaper.example
- smoke++: secret-токен guard + канон-проверки (зелёный)
- 0 hard личных данных; cut личного (kb/references/gsd/owner) → Ф4
2026-06-15 16:59:09 +03:00

1.2 KiB

paths
paths
**/*.cpp
**/*.hpp
**/*.cc
**/*.hh
**/*.cxx
**/*.h
**/CMakeLists.txt

C++ Coding Style

This file extends common/coding-style.md with C++ specific content.

Modern C++ (C++17/20/23)

  • Prefer modern C++ features over C-style constructs
  • Use auto when the type is obvious from context
  • Use constexpr for compile-time constants
  • Use structured bindings: auto [key, value] = map_entry;

Resource Management

  • RAII everywhere — no manual new/delete
  • Use std::unique_ptr for exclusive ownership
  • Use std::shared_ptr only when shared ownership is truly needed
  • Use std::make_unique / std::make_shared over raw new

Naming Conventions

  • Types/Classes: PascalCase
  • Functions/Methods: snake_case or camelCase (follow project convention)
  • Constants: kPascalCase or UPPER_SNAKE_CASE
  • Namespaces: lowercase
  • Member variables: snake_case_ (trailing underscore) or m_ prefix

Formatting

  • Use clang-format — no style debates
  • Run clang-format -i <file> before committing

Reference

See skill: cpp-coding-standards for comprehensive C++ coding standards and guidelines.