diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 3177680..0000000 --- a/.clang-format +++ /dev/null @@ -1,30 +0,0 @@ ---- -# Prism coding style — enforced by clang-format. -# Conventions that cannot be automated (e.g. return-type alignment -# across declarations) are documented in AGENTS.md. - -BasedOnStyle: LLVM - -# Indentation — tabs (no spaces) -UseTab: Always -IndentWidth: 8 -TabWidth: 8 - -# Braces — always required after if/else/for/while/do -AllowShortFunctionsOnASingleLine: false -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -BreakBeforeBraces: Attach - -# Pointer/reference alignment — * against name not type -PointerAlignment: Right -ReferenceAlignment: Right - -# Continuation lines — align with first parameter after ( -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false - -# Line width -ColumnLimit: 120 -PenaltyReturnTypeOnItsOwnLine: 1000 diff --git a/AGENTS.md b/AGENTS.md index 100cfb1..39e457a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,9 +34,11 @@ All code follows the patterns established in `src/wapp/`. The project prefix is ### Formatting -Machine-enforceable rules (tabs, braces, pointer alignment, continuation -alignment) are in `.clang-format` — run `clang-format -i ` to apply. - +- **Tabs for indentation**, 8-column tab width. +- **Braces** on the same line as control statements (Attach style). +- **Pointers**: `*` against the name, not the type (`PrRhiBuffer *buf`, not `PrRhiBuffer* buf`). +- **Line width**: 120 columns. +- **Continuation lines** align to the opening parenthesis. - **Return-type alignment**: Within each `// =====` section, align function declaration names so the first letter of every function occupies the same column. For pointer return types, place `*` directly against the function @@ -47,7 +49,6 @@ alignment) are in `.clang-format` — run `clang-format -i ` to apply. void prRhiDestroySwapchain(…); PrRhiSwapchainResult prRhiAcquireNextImage(…); ``` - This cannot be automated by clang-format and must be done manually. ### Storage qualifiers