summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-02-27 19:57:23 +0100
committerNico Huber <nico.h@gmx.de>2019-03-05 12:45:47 +0000
commit626ba097a2cd1c87800a2154420829b09803467e (patch)
tree20379a79e40534529697955f6403531569037c02
parentb27fb330c40c318188e34606d987661de079960f (diff)
downloadcoreboot-626ba097a2cd1c87800a2154420829b09803467e.tar.xz
lint/clang-format: set to 96 chars per line
80 chars + 2 tabs was the compromise we got to in the last round of discussion. Change-Id: I9293a69d1bea900da36501cde512004d0695ad37 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31651 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--.clang-format2
-rwxr-xr-xutil/lint/lint-007-checkpatch6
2 files changed, 5 insertions, 3 deletions
diff --git a/.clang-format b/.clang-format
index d853f50480..5c8aa3c439 100644
--- a/.clang-format
+++ b/.clang-format
@@ -7,7 +7,7 @@ AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
SortIncludes: false
ContinuationIndentWidth: 8
-ColumnLimit: 0
+ColumnLimit: 96
AlwaysBreakBeforeMultilineStrings: true
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
diff --git a/util/lint/lint-007-checkpatch b/util/lint/lint-007-checkpatch
index afa593e3b0..a7b63e8d7c 100755
--- a/util/lint/lint-007-checkpatch
+++ b/util/lint/lint-007-checkpatch
@@ -28,6 +28,8 @@ EXCLUDED_DIRS="^payloads/libpayload/util/kconfig\|\
^src/vendorcode\|\
^Documentation"
+opts="--max-line-length 96"
+
# default: test src and util
if [ "$1" = "" ]; then
INCLUDED_DIRS="src util"
@@ -35,7 +37,7 @@ if [ "$1" = "" ]; then
elif [ "$1" = "diff" ]; then
args=$( echo $EXCLUDED_DIRS | \
sed -e 's,\\|, ,g' -e 's,\^,--exclude=,g' )
- util/lint/checkpatch.pl --quiet --no-signoff $args -
+ util/lint/checkpatch.pl --quiet --no-signoff $opts $args -
exit $?
# Space separated list of directories to test
else
@@ -49,5 +51,5 @@ FILELIST=$( git ls-files $INCLUDED_DIRS | \
grep -v $EXCLUDED_DIRS )
for FILE in $FILELIST; do
- util/lint/checkpatch.pl --show-types --file --quiet "$FILE"
+ util/lint/checkpatch.pl --show-types --file --quiet $opts "$FILE"
done