[RFC PATCH] coccicheck: fail "make" when it fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With "make coccicheck", we generate contrib/coccinelle/*.cocci.patch
files that contain changes suggested by semantic patches, but "make"
succeeds.  Admittedly, not many developers may run "make coccicheck"
in the first place, but it makes it harder to notice when they do
run it after they introduced an iffy piece of code.

Check that the resulting cocci.patch files are all empty.

Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git c/Makefile w/Makefile
index 70d1543b6b..2c17868a24 100644
--- c/Makefile
+++ w/Makefile
@@ -3475,8 +3475,10 @@ coccicheck-test: $(COCCI_TEST_RES_GEN)
 coccicheck: coccicheck-test
 ifdef SPATCH_CONCAT_COCCI
 coccicheck: contrib/coccinelle/ALL.cocci.patch
+	! test -s contrib/coccinelle/ALL.cocci.patch
 else
 coccicheck: $(COCCICHECK_PATCHES_INTREE)
+	test $$(cat $(COCCICHECK_PATCHES_INTREE) | wc -c) = 0
 endif
 
 # See contrib/coccinelle/README




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux