Vadim Bendebury has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/38208 )
Change subject: Add .clang-format to help with patch formatting ......................................................................
Add .clang-format to help with patch formatting
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: I2306f9fa56caca2b1572f55a02c53fe10f51b7ad --- A .clang-format 1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/08/38208/1
diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..5c8aa3c --- /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: 96 +AlwaysBreakBeforeMultilineStrings: true +AllowShortLoopsOnASingleLine: false +AllowShortFunctionsOnASingleLine: false +AlignEscapedNewlinesLeft: false +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: false +AlignAfterOpenBracket: true +SpaceAfterCStyleCast: false +MaxEmptyLinesToKeep: 2 +BreakBeforeBinaryOperators: NonAssignment +BreakStringLiterals: false
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/38208 )
Change subject: Add .clang-format to help with patch formatting ......................................................................
Patch Set 1:
How much of the tree in it's current state conforms?
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/38208 )
Change subject: Add .clang-format to help with patch formatting ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/38208/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/38208/1//COMMIT_MSG@16 PS1, Line 16: s/o line
Hello Edward O'Callaghan, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/38208
to look at the new patch set (#2).
Change subject: Add .clang-format to help with patch formatting ......................................................................
Add .clang-format to help with patch formatting
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: I2306f9fa56caca2b1572f55a02c53fe10f51b7ad Signed-off-by: Vadim Bendebury vbendeb@chromium.org --- A .clang-format 1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/08/38208/2
Vadim Bendebury has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/38208 )
Change subject: Add .clang-format to help with patch formatting ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/flashrom/+/38208/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/38208/1//COMMIT_MSG@16 PS1, Line 16:
s/o line
Done
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/38208 )
Change subject: Add .clang-format to help with patch formatting ......................................................................
Patch Set 2:
Nice! I've been wanting to do this for a while since formatting issues are a common problem especially with submissions we get from newcomers (e.g. thru Github). I'll be happy to take a closer look at this later in the week.
The coding style is similar to coreboot, though we have a couple of differences for line length and tables: https://www.flashrom.org/Development_Guidelines#Coding_style
As Edward said we probably need to fix up a lot of stuff that's currently in the tree.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/38208 )
Change subject: Add .clang-format to help with patch formatting ......................................................................
Patch Set 2:
(1 comment)
Please only merge this when the config matches the whole codebase.
https://review.coreboot.org/c/flashrom/+/38208/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/38208/2//COMMIT_MSG@9 PS2, Line 9: This is a copy from the coreboot tree While some people might have used this to format new coreboot code, FWIW, it has done more damage for coreboot so far.
The file (and possibly clang-format itself) needs to be adapted to the existing coding style, not the other way around. Unless we want to establish a new style, ofc.
Vadim Bendebury has abandoned this change. ( https://review.coreboot.org/c/flashrom/+/38208 )
Change subject: Add .clang-format to help with patch formatting ......................................................................
Abandoned
abandoned in favor of https://review.coreboot.org/c/flashrom/+/38673