From 0086f6e37ab487f558cc71f791c514f94ba80e0c Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Wed, 21 Jun 2017 15:19:18 +0200 Subject: Add formatting rules --- .clang-format | 25 +++++++++++++++++++++++++ include/.clang-format | 24 ++++++++++++++++++++++++ src/data/.clang-format | 22 ++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 .clang-format create mode 100644 include/.clang-format create mode 100644 src/data/.clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..0a8159a8e --- /dev/null +++ b/.clang-format @@ -0,0 +1,25 @@ +BasedOnStyle: LLVM +AllowShortFunctionsOnASingleLine: None +BreakBeforeBraces: Allman +ColumnLimit: 100 +UseTab: Never +IndentWidth: 4 +TabWidth: 4 +AlignAfterOpenBracket: DontAlign +Cpp11BracedListStyle: false +BreakStringLiterals: false +IndentCaseLabels: false +BinPackArguments: false +BinPackParameters: false +AlignTrailingComments: false +IncludeCategories: + - Regex: '^"gba/types\.h"$' + Priority: -4 + - Regex: '^"global\.h"$' + Priority: -3 + - Regex: '^"gba/gba\.h"$' + Priority: -2 + - Regex: '^"gba/' + Priority: -1 + - Regex: '.\*' + Priority: 1 diff --git a/include/.clang-format b/include/.clang-format new file mode 100644 index 000000000..995d5d96d --- /dev/null +++ b/include/.clang-format @@ -0,0 +1,24 @@ +BasedOnStyle: LLVM +AllowShortFunctionsOnASingleLine: None +BreakBeforeBraces: Allman +ColumnLimit: 100 +UseTab: Never +IndentWidth: 4 +TabWidth: 4 +AlignAfterOpenBracket: DontAlign +Cpp11BracedListStyle: false +BreakStringLiterals: false +IndentCaseLabels: false +BinPackArguments: false +BinPackParameters: false +IncludeCategories: + - Regex: '^"gba/types\.h"$' + Priority: -4 + - Regex: '^"global\.h"$' + Priority: -3 + - Regex: '^"gba/gba\.h"$' + Priority: -2 + - Regex: '^"gba/' + Priority: -1 + - Regex: '.\*' + Priority: 1 diff --git a/src/data/.clang-format b/src/data/.clang-format new file mode 100644 index 000000000..036aa7d76 --- /dev/null +++ b/src/data/.clang-format @@ -0,0 +1,22 @@ +BasedOnStyle: LLVM +AllowShortFunctionsOnASingleLine: None +BreakBeforeBraces: Allman +ColumnLimit: 0 +UseTab: Never +IndentWidth: 4 +TabWidth: 4 +AlignAfterOpenBracket: DontAlign +Cpp11BracedListStyle: false +BreakStringLiterals: false +IndentCaseLabels: false +IncludeCategories: + - Regex: '^"gba/types\.h"$' + Priority: -4 + - Regex: '^"global\.h"$' + Priority: -3 + - Regex: '^"gba/gba\.h"$' + Priority: -2 + - Regex: '^"gba/' + Priority: -1 + - Regex: '.\*' + Priority: 1 -- cgit v1.2.3