Skip to content

Commit 4b3064e

Browse files
author
Clement Champetier
committed
tools: added format tools
* In format folder. * Use clang-format
1 parent 2b02671 commit 4b3064e

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tools/format/.clang-format

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
IndentWidth: 4
3+
UseTab: Never
4+
ColumnLimit: 125
5+
AllowShortFunctionsOnASingleLine: Inline
6+
AllowShortIfStatementsOnASingleLine: false
7+
BreakConstructorInitializersBeforeComma: true
8+
IndentCaseLabels: true
9+
BreakBeforeBraces: Allman
10+
NamespaceIndentation: None
11+
MaxEmptyLinesToKeep: 1
12+
KeepEmptyLinesAtTheStartOfBlocks: true
13+
PointerAlignment: Left
14+
SpaceBeforeParens: Never
15+
SpaceBeforeAssignmentOperators: true
16+
SpacesInParentheses: false
17+
AlwaysBreakTemplateDeclarations: true
18+
Standard: Auto
19+
AccessModifierOffset: -4

tools/format/format_all_files.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# src
3+
find ../../src -type f \( -iname \*.?pp \) -exec clang-format -i {} \;
4+
# apps
5+
find ../../app -type f \( -iname \*.?pp \) -exec clang-format -i {} \;

0 commit comments

Comments
 (0)