David Hendricks would like Vadim Bendebury to review this change.

View Change

[WIP] Add .clang-format to help with patch formatting

This is based on CB:38208 by Vadim, but with a few added changes.
Here is the original commit message.

This is a copy from the coreboot tree, could be tweaked to better
match the flashrom tree if there are any differences.

Once this file is in place a script could be deployed which would
format only new/changed lines in git patches.

Change-Id: I1fe22809c4a2d73fa02f4de55290d990a9750b86
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
---
A .clang-format
1 file changed, 21 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/73/38673/1
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..45c116b
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,21 @@
+BasedOnStyle: LLVM
+Language: Cpp
+IndentWidth: 8
+UseTab: Always
+BreakBeforeBraces: Linux
+AllowShortIfStatementsOnASingleLine: false
+IndentCaseLabels: false
+SortIncludes: false
+ContinuationIndentWidth: 8
+ColumnLimit: 112
+AlwaysBreakBeforeMultilineStrings: true
+AllowShortLoopsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: false
+AlignEscapedNewlinesLeft: false
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: false
+AlignAfterOpenBracket: true
+SpaceAfterCStyleCast: false
+MaxEmptyLinesToKeep: 2
+BreakBeforeBinaryOperators: NonAssignment
+BreakStringLiterals: false

To view, visit change 38673. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1fe22809c4a2d73fa02f4de55290d990a9750b86
Gerrit-Change-Number: 38673
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Vadim Bendebury <vbendeb@chromium.org>
Gerrit-MessageType: newchange