Skip to content

Commit 8885ca1

Browse files
LiberalArtistAeva
andcommitted
Add CONTRIBUTING.md
The guidelines were written by Aeva in <Aeva#9 (comment)>. Co-Authored-By: Aeva Palecek <aeva.ntsc@gmail.com>
1 parent 24cfebf commit 8885ca1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributing to Tangerine
2+
3+
Contributions are welcome!
4+
Here are some pointers.
5+
6+
## C++ Style Guide
7+
8+
C++ code written for Tangerine (i.e. in `tangerine/`, not in `third_party/`) should generally follow the [Unreal Engine coding standards](https://docs.unrealengine.com/5.1/en-US/epic-cplusplus-coding-standard-for-unreal-engine/), except that Tangerine does not use Hungarian notation.
9+
10+
The main points are:
11+
12+
- Indent with tabs, one tab per indentation level.
13+
Tabs are to be 4 characters wide.
14+
15+
- Braces are always on their own line at the same indentation level as the surrounding scope.
16+
17+
- `TitleCase` is used for all class names, function names, variable names, constants, and so on.
18+
19+
- Variable names should be descriptive and useful.
20+
21+
- Single digit variables may be lower case for loop counters, but should generally be uppercase otherwise.
22+
23+
- Single digit variable names should be avoided in favor of more descriptive names, but they do show up as loop counters, coordinates, and sometimes math terms.
24+
25+
- `UPPER_SNAKE_CASE` is used for preprocessor defines.
26+
27+
- Preprocessor directives should be lowercase and have no space between the `#` and the name, like so: `#define FNORD 1`.
28+
29+
- Preprocessor directives generally aren't indented, but may be if it improves clarity.
30+
31+
- `snake_case` is used for labels.
32+
33+
- Labels should not be indented.
34+
35+
- `goto` is acceptable when it improves readability.
36+
37+
- There's no line limit, but the code should probably read ok on a modest 1080p monitor in a full screen window with a reasonable font size.

0 commit comments

Comments
 (0)