Code Style
Table of Contents
1. Capitalization
- classes and structs:
CapitalizedWords- example:
EventHandler,Array - exceptions:
string,vector2,vector3,name
- example:
- classes with prefix:
prefix_CapitalizedWords - functions:
camelCase - constants:
ALL_CAPS- exceptions:
CapitalizedWordsif they contain no underscores - exceptions: enumeration-like:
PREFIX_CapitalizedWords
- exceptions:
- class members:
mCapitalizedWords- exceptions:
camelCaseif a class is plain data
- exceptions:
- local variables and parameters:
camelCase - states:
CapitalizedWords - properties:
CapitalizedWords - console variables and aliases:
snake_case
2. Formatting
See ../.clang-format, ../.editorconfig, and ../.pre-commit-config.yaml for formatting settings.
3. Abbreviations
Minimize the use of abbreviations. Capitalize abbreviations as single words (Http,
Cvar).
4. Language
See ../.dir-locals.el for spellcheck settings.
5. Encoding
ASCII or UTF-8.