Start the process of standardizing the formatting of documentation inside our header files.

This commit is contained in:
2026-02-14 02:14:19 -05:00
parent dd159b064d
commit d046ef8161
11 changed files with 567 additions and 399 deletions

View File

@@ -0,0 +1,57 @@
# Comment Formatting Standards
## Line Width
Wrap comments at approximately 60 columns. Code and function signatures are not wrapped.
## Comment Style
Use C++ style (`//`) for all comments. Use `/** */` only for UENUM/UPROPERTY values that should appear as tooltips in the blueprint editor.
## Section Banners
Each class, struct, or enum gets a banner block. The banner line is 60 characters of slashes. The banner names the type and gives a brief description.
```cpp
////////////////////////////////////////////////////////////
//
// FlxExampleClass
//
// Brief description of what this class does.
//
////////////////////////////////////////////////////////////
```
## Header File Banners
Ideally, we'd like to have documentation about what a header
file is for. This would be a banner block at the top of the
header file, before the pragma once. If you're claude code,
and there is no documentation yet, generate a little, but
mark it "DOCUMENTATION GENERATED BY CLAUDE."
## Member Comments
Comments on member variables and functions use `//` followed by a blank `//` line:
```cpp
// Brief description of what this does.
//
void DoSomething();
```
## UFUNCTION Spacing
UFUNCTION-decorated members should be followed by a single blank line to visually separate them from the next member:
```cpp
// Get the value.
//
UFUNCTION(BlueprintCallable)
int32 GetValue() const;
// Set the value.
//
UFUNCTION(BlueprintCallable)
void SetValue(int32 Val);
```