Skip to content

Commit

Permalink
add format tools
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjipeng committed Dec 26, 2023
1 parent e968abb commit 1f12c7b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/code_format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

astyle --options=code_style.ini --recursive "../src/*.cpp,*.h"
astyle --options=code_style.ini --recursive "../ext/*.cpp,*.h"
astyle --options=code_style.ini --recursive "../include/*.h"
24 changes: 24 additions & 0 deletions tools/code_style.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--style=1tbs
--indent=spaces=4
--suffix=none
--lineend=linux
--align-pointer=type
--align-reference=type
--min-conditional-indent=0
--max-continuation-indent=120
--convert-tabs
--attach-return-type
--attach-return-type-decl
--squeeze-ws
--pad-comma
--pad-oper
--pad-header
--indent-preproc-block
--indent-preproc-define
--indent-col1-comments
--indent-switches
--indent-cases
--attach-closing-while
--attach-namespaces
--keep-one-line-blocks
--formatted

0 comments on commit 1f12c7b

Please sign in to comment.