Add --keep-one-line-blocks to astyle

This commit is contained in:
Florian Märkl 2018-03-21 23:10:35 +01:00
parent 3cd71f75e1
commit 0cc1f23826
2 changed files with 8 additions and 9 deletions

View File

@ -39,7 +39,7 @@ We follow [these guidelines](https://wiki.qt.io/Qt_Coding_Style) to format the c
If in doubt, you can use [AStyle 2.06](https://sourceforge.net/projects/astyle/files/astyle/astyle%202.06/) to format the code. The command line for formatting the code according to the style is:
```bash
astyle --style=kr --indent=spaces=4 --align-pointer=name --align-reference=name --convert-tabs --attach-namespaces --max-code-length=100 --max-instatement-indent=120 --pad-header --pad-oper filename.cpp
astyle --project=src/Cutter.astylerc src/filename.cpp
```
### Functions documentation

View File

@ -1,13 +1,12 @@
--style=allman
--convert-tabs
--style=kr
--indent=spaces=4
--align-pointer=name
--align-reference=name
--indent=spaces
--indent-namespaces
--indent-col1-comments
--pad-oper
--convert-tabs
--attach-namespaces
--max-code-length=100
--max-instatement-indent=120
--pad-header
--unpad-paren
--pad-oper
--keep-one-line-blocks
--close-templates