summaryrefslogtreecommitdiffstats
path: root/scripts/coccicheck
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2016-06-29 18:14:52 -0400
committerMichal Marek <mmarek@suse.com>2016-07-22 06:13:39 -0400
commit8e826ad52b751ca34d5153533f4f58ec38cf4799 (patch)
tree8208174d1b04f2f521da280d1785a0cad75e5ccb /scripts/coccicheck
parent13d948653372987388a09c259758abd44ed6e7f2 (diff)
coccicheck: make SPFLAGS more useful
SPFLAGS is set early, it means that any heuristics done on coccicheck cannot be overridden currently. Move SPFLAGS after OPTIONS and set this at the end. This lets you override any heuristics as coccinelle treats conflicts by only listening to the last option that makes sense. v3: this patch was added in the v3 series v4: Update Documentation/coccinelle.txt explaining how SPFLAGS works as well. Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> Acked-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/coccicheck')
-rwxr-xr-xscripts/coccicheck5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck
index f137b04dfdd3..5319fae910b4 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -30,7 +30,7 @@ else
30 NPROC="$J" 30 NPROC="$J"
31fi 31fi
32 32
33FLAGS="--very-quiet $SPFLAGS" 33FLAGS="--very-quiet"
34 34
35# spatch only allows include directories with the syntax "-I include" 35# spatch only allows include directories with the syntax "-I include"
36# while gcc also allows "-Iinclude" and "-include include" 36# while gcc also allows "-Iinclude" and "-include include"
@@ -106,6 +106,9 @@ kill_running() {
106 done 106 done
107} 107}
108 108
109# You can override heuristics with SPFLAGS, these must always go last
110OPTIONS="$OPTIONS $SPFLAGS"
111
109coccinelle () { 112coccinelle () {
110 COCCI="$1" 113 COCCI="$1"
111 114