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 - project names:
CapitalizedWords- exceptions: external projects imported into DoomToolbox retain their names, e.g. libeye
- Typist.pk3, 10.5x
2. Formatting
See ../.clang-format, ../.editorconfig, ../.pre-commit-config.yaml, and ../pyproject.toml 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.