Skip to content

Scopy style guidelines

DanielGuramulta edited this page Dec 3, 2018 · 3 revisions

To enforce style guidelines, astyle is used.

For the source code of Scopy, the following script should be used:

--style=linux
--indent=force-tab=8
--attach-namespaces
--attach-extern-c
--break-blocks
--align-pointer=name
--align-reference=type
--add-brackets
--max-code-length=80
--break-after-logical
--mode=c
--suffix=none
--lineend=linux
--unpad-paren
--pad-header

To use it, copy the script above to a file named e.g. 'astylerc'.
Then, to apply the style to the source file example.cpp, call 'astyle' with the following command:
astyle --options=astylerc example.cpp

The file example.cpp will be rewritten to match the style rules.

Clone this wiki locally