]> granicus.if.org Git - icinga2/commitdiff
Docs: Improve styleguide for Windows
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 31 Jul 2019 11:59:08 +0000 (13:59 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 31 Jul 2019 11:59:08 +0000 (13:59 +0200)
doc/21-development.md
doc/images/development/windows_visual_studio_tabs_c++.png [new file with mode: 0644]

index f73041c4b28b0b73ab10b1fca6f87bcf859cbd2d..7a8ea2cedf2fb673043a9fccc3469dd95dbbb3ce 100644 (file)
@@ -9,7 +9,7 @@ development, package builds and tests.
 * [Test Icinga 2](21-development.md#development-tests)
     * [Snapshot Packages (Nightly Builds)](21-development.md#development-tests-snapshot-packages)
 * [Develop Icinga 2](21-development.md#development-develop)
-    * [Preparations](21-development.md#development-develop-styleguide)
+    * [Preparations](21-development.md#development-develop-prepare)
     * [Design Patterns](21-development.md#development-develop-design-patterns)
     * [Build Tools](21-development.md#development-develop-builds-tools)
     * [Unit Tests](21-development.md#development-develop-tests)
@@ -749,6 +749,9 @@ Depending on the file type, this must be a comment.
 
 #### Code Formatting <a id="development-develop-code-formatting"></a>
 
+**Tabs instead of spaces.** Inside Visual Studio, choose to keep tabs instead of
+spaces. Tabs should use 4 spaces indent by default, depending on your likings.
+
 We follow the clang format, with some exceptions.
 
 - Curly braces for functions and classes always start at a new line.
@@ -1614,6 +1617,23 @@ In addition also choose these individual components on Visual Studio 2017:
 
 After a while, Visual Studio will be ready.
 
+##### Style Guide for Visual Studio
+
+Navigate into `Tools > Options > Text Editor` and repeat the following for
+
+- C++
+- C#
+
+Navigate into `Tabs` and set:
+
+- Indenting: Smart (default)
+- Tab size: 4
+- Indent size: 4
+- Keep tabs (instead of spaces)
+
+![Visual Studio Tabs](images/development/windows_visual_studio_tabs_c++.png)
+
+
 #### Flex and Bison
 
 Install it using [chocolatey](https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html):
diff --git a/doc/images/development/windows_visual_studio_tabs_c++.png b/doc/images/development/windows_visual_studio_tabs_c++.png
new file mode 100644 (file)
index 0000000..d511469
Binary files /dev/null and b/doc/images/development/windows_visual_studio_tabs_c++.png differ