summaryrefslogtreecommitdiff
path: root/util/lint
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-01-10 19:41:54 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2014-01-11 10:56:54 +0100
commit08fec4605830b1a525e7cacab7d31f18f455d4c3 (patch)
tree91cc6e526159368a90599d1bd4b487bae2a1810a /util/lint
parent5d1ada0f6431962bef812844c79e01ba5048e6fa (diff)
downloadcoreboot-08fec4605830b1a525e7cacab7d31f18f455d4c3.tar.xz
lint: check label style only on changed files
This should probably propagate to the other lint checks. The idea: only enforce style on files that were at least touched by the developer. Change-Id: I5ac690ee726e27e80e790fa9a41cd14b84ad2161 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/4644 Tested-by: build bot (Jenkins) Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/lint')
-rwxr-xr-xutil/lint/lint-stable-004-style-labels2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/lint/lint-stable-004-style-labels b/util/lint/lint-stable-004-style-labels
index 31ad74e0e4..10b0408575 100755
--- a/util/lint/lint-stable-004-style-labels
+++ b/util/lint/lint-stable-004-style-labels
@@ -19,4 +19,4 @@
# DESCR: Check that C labels begin at start-of-line
LC_ALL=C export LC_ALL
-find src -name '*.[scS]' -exec grep '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' {} + |grep -v "[^a-z_]default:"
+git diff --name-status |grep -v "^D" |cut -c3- |grep "^src/.*\.[csS]" | xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' |grep -v "[^a-z_]default:"