[coreboot-gerrit] New patch to review for coreboot: d0453bb lint: check label style only on changed files
Patrick Georgi (patrick@georgi-clan.de)
gerrit at coreboot.org
Fri Jan 10 19:43:25 CET 2014
Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4644
-gerrit
commit d0453bbdc34451d0e57ea9b7693c88a0aefc533f
Author: Patrick Georgi <patrick at georgi-clan.de>
Date: Fri Jan 10 19:41:54 2014 +0100
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 at georgi-clan.de>
---
util/lint/lint-stable-004-style-labels | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/lint/lint-stable-004-style-labels b/util/lint/lint-stable-004-style-labels
index 31ad74e..10b0408 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:"
More information about the coreboot-gerrit
mailing list