Use pre-commit and editorconfig (#753)

* Add editorconfig and pre-commit config

Editorconfig is widly used and supported file. It says basic things how
files should be formatted.

pre-commit is tool which can automatically check some basic checks like
code formatting everytime someone makes commit. This can also be used in
CI to run these things. Then it is very easy to do same things locally
as in CI. This also makes easy to select clang-format version so
everyone is using same one.

* clang-format: Ignore folders where are external code

We should not format external code. Add clang-format files to exclude
those. We should move external code always to example external/ folder
so we can exclude those more easily.

* clang-format: Remove custom zephyr/.clang-gormat

This clang-format file where introduces before our root clang-format. It
does not make sense anymore as we have root clang-format. Removing this
will unifie formatting in whole repo.

* clang-format: Add couple new rules

Add couple new formatting rules.

Always align const to left side. We did have only one place where it was
right side so this make sense as it is already rule for us.

I choose also insertbraces becuase when I run this I notice that we have
lot of multiline code without braces. So very error prone places. This
will take error possibility away. Repo also always use braces even with
single line statments so this does not matter much.

* ci: Add pre-commit validation

Validate pre-commit in CI.

* format: Convert spaces to tabs in Makefiles

Makefile normally use tabs. We enforce that with editorconfig. Fix
couple places where spaces where still in use.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
Kari Argillander
2024-08-29 01:04:00 +03:00
committed by GitHub
parent 599033b7b0
commit 0177c59f4a
39 changed files with 317 additions and 174 deletions
+3
View File
@@ -10,6 +10,7 @@ AllowShortLoopsOnASingleLine: false
AlignEscapedNewlines: Left AlignEscapedNewlines: Left
AlignArrayOfStructures: None AlignArrayOfStructures: None
PointerAlignment: Right PointerAlignment: Right
InsertBraces: true
BreakBeforeBraces: Linux BreakBeforeBraces: Linux
BreakBeforeBinaryOperators: None BreakBeforeBinaryOperators: None
KeepEmptyLinesAtTheStartOfBlocks: false KeepEmptyLinesAtTheStartOfBlocks: false
@@ -18,6 +19,8 @@ IndentWidth: 4
UseTab: Never UseTab: Never
SortIncludes: false SortIncludes: false
ColumnLimit: 80 ColumnLimit: 80
# Const always to left side.
QualifierAlignment: Left
--- ---
Language: JavaScript Language: JavaScript
DisableFormat: true DisableFormat: true
+33
View File
@@ -0,0 +1,33 @@
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
# Currently project use git "* text=auto".
end_of_line = unset
[CMakelists.txt]
indent_size = 2
[Dockerfile]
indent_size = 2
# Makefiles needs tabs.
[{Makefile,*.{mgw,mak,MAK}}]
indent_style = tab
# Some project files. Saving might change files.
[*.{sln,atsln,layout}]
indent_style = tab
insert_final_newline = unset
[*.{,vcxproj*,props,cproj,tpi}]
insert_final_newline = unset
[*.{yaml,yml}]
indent_size = 2
[*.{html,htm}]
indent_size = 2
+7
View File
@@ -9,6 +9,13 @@ on:
- '*' - '*'
jobs: jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1
scan-build: scan-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
+75
View File
@@ -0,0 +1,75 @@
# Pre-commit is tool which we use to format and check this repository. This is
# also used in CI. You will still get nicer commits if you install it also
# locally.
#
# To install pre-commit run in repository root:
# pip install pre-commit
# pre-commit install
#
# To ignore pre-commit checks run:
# git commit --no-verify
# or
# pre-commit uninstall
# Just in case exclude build and .git folders. Others are for external files.
exclude: build|\.git|external/|BACnet\-Server\.X/|tools/(avstack|check\-stack\-usage|memap)|test/ztest/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # v4.6.0
hooks:
- id: check-merge-conflict
args: [--assume-in-merge]
# Editorconfig-checker does not care if file contains multiple newlines.
- id: end-of-file-fixer
exclude: '.*\.(cproj|vcxproj.*|props)$'
- id: check-yaml
args: [
# for .clang-format
--allow-multiple-documents,
]
- id: check-case-conflict
- id: check-shebang-scripts-are-executable
- id: fix-byte-order-marker
# Seems that VS files are using BOMs.
exclude: '.*\.(cproj|vcxproj.*|sln|atsln|props)$'
- id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: a30f0d816e5062a67d87c8de753cfe499672b959 # v1.5.5
hooks:
- id: remove-tabs
name: Remove tabs (4 spaces)
args: ["--whitespaces-count", "4"]
exclude: \.(yaml|yml|html|htm|sln|atsln|layout)$|Makefile|\.(mgw|mak|MAK)$|Dockerfile$
- id: remove-tabs
name: Remove tabs (2 spaces)
args: ["--whitespaces-count", "2"]
files: '.*\.(yaml|yml|html|htm)|Dockerfile$'
# We will enable this in future.
# - repo: https://github.com/pre-commit/mirrors-clang-format
# rev: 3b03191b6a60cba0fc25c2dc2e30ea4854d897eb # v17.0.5
# hooks:
# - id: clang-format
# We might enable this in future.
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # v3.1.0
# hooks:
# - id: prettier
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316 # v1.10.0
hooks:
- id: text-unicode-replacement-char
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 1c48f639855b49be07ace8b824757152b6747baa #2.6.2
hooks:
- id: editorconfig-checker
alias: ec
args: [
# Saddly we have to disable this, but it just won't work. Maybe some day.
-disable-indent-size,
]
+1 -1
View File
@@ -247,7 +247,7 @@ ports: atmega168 bdk-atxx4-mstp at91sam7s stm32f10x stm32f4xx
.PHONY: ports-clean .PHONY: ports-clean
ports-clean: atmega168-clean bdk-atxx4-mstp-clean at91sam7s-clean \ ports-clean: atmega168-clean bdk-atxx4-mstp-clean at91sam7s-clean \
stm32f10x-clean stm32f4xx-clean xplained-clean stm32f10x-clean stm32f4xx-clean xplained-clean
.PHONY: atmega168 .PHONY: atmega168
atmega168: ports/atmega168/Makefile atmega168: ports/atmega168/Makefile
+1 -1
View File
@@ -154,7 +154,7 @@ WARNING_ALL += -Wunused-variable
# since they are common in embedded # since they are common in embedded
WARNING_ALL += -Wno-sign-conversion -Wno-conversion -Wno-sign-compare WARNING_ALL += -Wno-sign-conversion -Wno-conversion -Wno-sign-compare
WARNING_ALL += -Wno-long-long -Wno-attributes WARNING_ALL += -Wno-long-long -Wno-attributes
# don't warn about implicit fallthrough since it's common in network protocols # don't warn about implicit fallthrough since it's common in network protocols
WARNING_ALL += -Wno-implicit-fallthrough WARNING_ALL += -Wno-implicit-fallthrough
#WARNING_ALL += -Werror #WARNING_ALL += -Werror
WARNINGS ?= $(WARNING_ALL) WARNINGS ?= $(WARNING_ALL)
+3 -3
View File
@@ -190,9 +190,9 @@ lint:
$(LINT) $(BFLAGS) $(CSRC) $(LINT) $(BFLAGS) $(CSRC)
install: $(TARGET_ELF) install: $(TARGET_ELF)
$(AVRDUDE) -c $(AVRDUDE_PROGRAMMERID) \ $(AVRDUDE) -c $(AVRDUDE_PROGRAMMERID) \
-p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -e \ -p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -e \
-U flash:w:$(TARGET).hex -U flash:w:$(TARGET).hex
## Clean target ## Clean target
.PHONY: clean .PHONY: clean
+5
View File
@@ -0,0 +1,5 @@
---
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+3 -3
View File
@@ -180,9 +180,9 @@ lint:
$(LINT) $(BFLAGS) $(CSRC) $(LINT) $(BFLAGS) $(CSRC)
install: $(TARGET_ELF) install: $(TARGET_ELF)
$(AVRDUDE) -c $(AVRDUDE_PROGRAMMERID) \ $(AVRDUDE) -c $(AVRDUDE_PROGRAMMERID) \
-p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -e \ -p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -e \
-U flash:w:$(TARGET).hex -U flash:w:$(TARGET).hex
## Clean target ## Clean target
.PHONY: clean .PHONY: clean
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+5
View File
@@ -0,0 +1,5 @@
---
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+5
View File
@@ -0,0 +1,5 @@
---
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+5
View File
@@ -0,0 +1,5 @@
---
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+1 -1
View File
@@ -87,7 +87,7 @@ install: $(PRODUCT_EXE)
$(PRODUCT_EXE) : $(OBJS) $(PRODUCT_EXE) : $(OBJS)
@echo Running Linker for $(PRODUCT_EXE) @echo Running Linker for $(PRODUCT_EXE)
$(LINK) -L$(C_LIB_DIR) -L$(BACNET_LIB_DIR) -m -c -s -v @&&| $(LINK) -L$(C_LIB_DIR) -L$(BACNET_LIB_DIR) -m -c -s -v @&&|
$(BORLAND_DIR)\lib\c0x32.obj $** $(BORLAND_DIR)\lib\c0x32.obj $**
$< $<
$*.map $*.map
$(LIBS) $(LIBS)
+4 -4
View File
@@ -7,8 +7,8 @@
!ifndef BORLAND_DIR !ifndef BORLAND_DIR
BORLAND_DIR_Not_Defined: BORLAND_DIR_Not_Defined:
@echo . @echo .
@echo You must define environment variable BORLAND_DIR to compile. @echo You must define environment variable BORLAND_DIR to compile.
!endif !endif
PRODUCT = rs485 PRODUCT = rs485
@@ -59,7 +59,7 @@ all : $(BCC_CFG) $(PRODUCT_EXE)
$(PRODUCT_EXE) : $(OBJS) $(PRODUCT_EXE) : $(OBJS)
@echo Running Linker for $(PRODUCT_EXE) @echo Running Linker for $(PRODUCT_EXE)
$(LINK) -L$(C_LIB_DIR) -m -c -s -v @&&| # temp response file, starts with | $(LINK) -L$(C_LIB_DIR) -m -c -s -v @&&| # temp response file, starts with |
$(BORLAND_DIR)\lib\c0x32.obj $** # $** lists each dependency $(BORLAND_DIR)\lib\c0x32.obj $** # $** lists each dependency
$< $<
$*.map $*.map
$(LIBS) $(LIBS)
@@ -91,7 +91,7 @@ clean :
# Compiler configuration file # Compiler configuration file
$(BCC_CFG) : $(BCC_CFG) :
Copy &&| Copy &&|
$(CFLAGS) $(CFLAGS)
-c -c
-y #include line numbers in OBJ's -y #include line numbers in OBJ's
+7
View File
@@ -0,0 +1,7 @@
---
# Disable formatting for now as there is external code. We should move external
# code to a separate directory and enable formatting for our code.
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+5
View File
@@ -0,0 +1,5 @@
---
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+1 -1
View File
@@ -12,7 +12,7 @@
CFLAGS += -Dbacnet_stack_EXPORTS CFLAGS += -Dbacnet_stack_EXPORTS
ifeq ($(STATIC),1) ifeq ($(STATIC),1)
CFLAGS += -DBACNET_STACK_STATIC_DEFINE CFLAGS += -DBACNET_STACK_STATIC_DEFINE
endif endif
# These might be already defined in an previous Makefile # These might be already defined in an previous Makefile
+15 -15
View File
@@ -33,21 +33,21 @@ endif
# overwhelm builders with limited resources # overwhelm builders with limited resources
# set job limits based on number of core processors # set job limits based on number of core processors
ifeq (${JOBS},) ifeq (${JOBS},)
ifeq ($(UNAME_S),Windows) ifeq ($(UNAME_S),Windows)
JOBS = "-j %NUMBER_OF_PROCESSORS%" JOBS = "-j %NUMBER_OF_PROCESSORS%"
endif endif
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
JOBS = "-j $(shell nproc)" JOBS = "-j $(shell nproc)"
endif endif
ifeq ($(UNAME_S),Darwin) ifeq ($(UNAME_S),Darwin)
JOBS = "-j $(sysctl -n hw.ncpu)" JOBS = "-j $(sysctl -n hw.ncpu)"
endif endif
ifeq ($(UNAME_S),BSD) ifeq ($(UNAME_S),BSD)
JOBS = "-j $(sysctl -n hw.ncpu)" JOBS = "-j $(sysctl -n hw.ncpu)"
endif endif
ifeq ($(UNAME_S),MinGW) ifeq ($(UNAME_S),MinGW)
JOBS = "-j" JOBS = "-j"
endif endif
endif endif
.PHONY: test .PHONY: test
+5
View File
@@ -0,0 +1,5 @@
---
DisableFormat: true
# DisableFormat will not disable include sorting with some versions.
SortIncludes: Never
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
+7
View File
@@ -0,0 +1,7 @@
# External folder so ignore everything.
[*]
charset = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
end_of_line = unset
-145
View File
@@ -1,145 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
#
# clang-format configuration file. Intended for clang-format >= 4.
#
# For more information, see:
#
# Documentation/process/clang-format.rst
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
#AfterExternBlock: false # Unknown to clang-format-5.0
BeforeCatch: false
BeforeElse: false
IndentBraces: false
#SplitEmptyFunction: true # Unknown to clang-format-4.0
#SplitEmptyRecord: true # Unknown to clang-format-4.0
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
#CompactNamespaces: false # Unknown to clang-format-4.0
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
#FixNamespaceComments: false # Unknown to clang-format-4.0
# Taken from:
# git grep -h '^#define [^[:space:]]*FOR_EACH[^[:space:]]*(' include/ \
# | sed "s,^#define \([^[:space:]]*FOR_EACH[^[:space:]]*\)(.*$, - '\1'," \
# | sort | uniq
ForEachMacros:
- 'FOR_EACH'
- 'FOR_EACH_FIXED_ARG'
- 'RB_FOR_EACH'
- 'RB_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_DLIST_FOR_EACH_NODE'
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SFLIST_FOR_EACH_NODE'
- 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SLIST_FOR_EACH_CONTAINER'
- 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SLIST_FOR_EACH_NODE'
- 'SYS_SLIST_FOR_EACH_NODE_SAFE'
- 'Z_GENLIST_FOR_EACH_CONTAINER'
- 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
- 'Z_GENLIST_FOR_EACH_NODE'
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
- '_WAIT_Q_FOR_EACH'
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
#IndentPPDirectives: None # Unknown to clang-format-5.0
IndentWidth: 8
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
ObjCBlockIndentWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
# Taken from git's rules
#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: false
SortIncludes: false
#SortUsingDeclarations: false # Unknown to clang-format-4.0
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
SpaceBeforeParens: ControlStatements
#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: Always
...