clang formatter setup eclipse
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Jakob Meier 2022-01-24 15:38:00 +01:00
parent a56224c339
commit 512d339803

View File

@ -20,6 +20,7 @@
13. [Eclipse](#eclipse) 13. [Eclipse](#eclipse)
14. [Running the OBSW on a Raspberry Pi](#rpi) 14. [Running the OBSW on a Raspberry Pi](#rpi)
15. [FSFW](#fsfw) 15. [FSFW](#fsfw)
16. [Coding Style](#coding-style)
# <a id="general"></a> General information # <a id="general"></a> General information
@ -1151,3 +1152,15 @@ git merge upstream/master
Alternatively, changes from other upstreams (forks) and branches can be merged like that Alternatively, changes from other upstreams (forks) and branches can be merged like that
in the same way. in the same way.
# <a id="coding-style"></a> Coding Style
* the formatting is based on the clang-format tools
## Setting up eclipse auto-fromatter with clang-format
1. Help &rarr; Install New Software &rarr; Add
2. In location insert the link http://www.cppstyle.com/luna
3. The software package CppStyle should now be available for installation
4. On windows download the clang-formatting tools from https://llvm.org/builds/. On linux clang-format can be installed with the package manager.
5. Navigate to Preferences &rarr; C/C++ &rarr; CppStyle
6. Insert the path to the clang-format executable
7. Under C/C++ &rarr; Code Style &rarr; Formatter, change the formatter to CppStyle (clang-format)
8. Code can now be formatted with the clang tool by using the key combination Ctrl + Shift + f