From 820d510c129d11a27bf7777e8e3101f55d3835e8 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Mon, 16 Jul 2018 23:33:11 +0300 Subject: [PATCH] Add a TOC in the coding guidelines --- CODING_GUIDELINES.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CODING_GUIDELINES.md b/CODING_GUIDELINES.md index 0ed8fd428..4ad026d3e 100644 --- a/CODING_GUIDELINES.md +++ b/CODING_GUIDELINES.md @@ -6,6 +6,31 @@ For programming languages other than C++ (e.g. JavaScript) used in this reposito **Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder. **Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder. +### Table Of Contents + +* [1. New lines & curly braces](#1-new-lines--curly-braces) + * [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces) + * [b. Other code blocks](#b-other-code-blocks) + * [c. Blocks in switch's case labels](#c-blocks-in-switchs-case-labels) + * [d. If-else statements](#d-if-else-statements) + * [e. Single statement if blocks](#e-single-statement-if-blocks) + * [f. Acceptable conditions to omit braces](#f-acceptable-conditions-to-omit-braces) + * [g. Brace enclosed initializers](#g-brace-enclosed-initializers) +* [2. Indentation](#2-indentation) +* [3. File encoding and line endings.](#3-file-encoding-and-line-endings) +* [4. Initialization lists.](#4-initialization-lists) +* [5. Enums.](#5-enums) +* [6. Names.](#6-names) + * [a. Type names and namespaces](#a-type-names-and-namespaces) + * [b. Variable names](#b-variable-names) + * [c. Private member variable names](#c-private-member-variable-names) +* [7. Header inclusion order.](#7-header-inclusion-order) +* [8. Include guard.](#8-include-guard) +* [9. Misc.](#9-misc) +* [10. Git commit message](#10-git-commit-message) +* [11. Not covered above](#11-not-covered-above) +--- + ### 1. New lines & curly braces ### #### a. Function blocks, class/struct definitions, namespaces ####