diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..f3316f7ec --- /dev/null +++ b/.clang-format @@ -0,0 +1,11 @@ +BasedOnStyle: LLVM +UseTab: Always +IndentWidth: 4 +TabWidth: 4 +BreakBeforeBraces: Attach +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +ColumnLimit: 0 +AccessModifierOffset: -4 +NamespaceIndentation: All +FixNamespaceComments: false diff --git a/BUILDING.md b/BUILDING.md index b6d47fc9f..8b1782483 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -3,6 +3,7 @@ ## Editor Any editor can be used for editing. However, the repository does have settings to ensure consistent formatting when using [Visual Code](https://code.visualstudio.com/). For other editors, please use `tab` instead of `spaces` with `tabSize` of `4` for indentation. +`.clang-format` provides consistent formatting for other editors and can be used by the command line `clang-format` tool to format a file with `clang-format -i `. ## Nodejs