Don't use clang-format
This commit is contained in:
@@ -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
|
|
||||||
@@ -34,9 +34,11 @@ All code follows the patterns established in `src/wapp/`. The project prefix is
|
|||||||
|
|
||||||
### Formatting
|
### Formatting
|
||||||
|
|
||||||
Machine-enforceable rules (tabs, braces, pointer alignment, continuation
|
- **Tabs for indentation**, 8-column tab width.
|
||||||
alignment) are in `.clang-format` — run `clang-format -i <file>` to apply.
|
- **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
|
- **Return-type alignment**: Within each `// =====` section, align function
|
||||||
declaration names so the first letter of every function occupies the same
|
declaration names so the first letter of every function occupies the same
|
||||||
column. For pointer return types, place `*` directly against the function
|
column. For pointer return types, place `*` directly against the function
|
||||||
@@ -47,7 +49,6 @@ alignment) are in `.clang-format` — run `clang-format -i <file>` to apply.
|
|||||||
void prRhiDestroySwapchain(…);
|
void prRhiDestroySwapchain(…);
|
||||||
PrRhiSwapchainResult prRhiAcquireNextImage(…);
|
PrRhiSwapchainResult prRhiAcquireNextImage(…);
|
||||||
```
|
```
|
||||||
This cannot be automated by clang-format and must be done manually.
|
|
||||||
|
|
||||||
### Storage qualifiers
|
### Storage qualifiers
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user