diff --git a/doc/21-development.md b/doc/21-development.md index f73041c4b..7a8ea2ced 100644 --- a/doc/21-development.md +++ b/doc/21-development.md @@ -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 +**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 index 000000000..d511469be Binary files /dev/null and b/doc/images/development/windows_visual_studio_tabs_c++.png differ