From d34a6058fb9a93d1ba1c5ea70f3ba536edd2fd6e Mon Sep 17 00:00:00 2001 From: modeco80 Date: Sun, 15 Feb 2026 11:16:15 -0500 Subject: [PATCH] //docs: Add coding style document --- docs/CODING_STYLE.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/CODING_STYLE.md diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md new file mode 100644 index 0000000..1183ccd --- /dev/null +++ b/docs/CODING_STYLE.md @@ -0,0 +1,39 @@ +# TV2HV Coding Style + +This is enforced mostly by clang-format, but there are some rules that it doesn't enforce so they have to be written here. Don't worry, this won't be too much or too long. + +# Type names + +All type names are PascalCase, except for the trivial integer types. + +Good example: + +```cpp + +enum MyEnum : u8 { + +}; + +struct MyStruct {}; + +class MyClass {}; + +``` + +Bad example: + +```cpp +class classExample {}; +``` + +# Member/variable names + +Member and variable names are camelCase. + +```cpp +class MyClass { + u8 value; +public: + u8 getValue() const { return value; } +}; +```