[PATCH] maint: prohibit empty first lines

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

 



I just found this in one of my branches and I remembered I wanted to
send this right after a discussion with Eric, but I forgot, somehow:

https://www.redhat.com/archives/libvir-list/2014-March/msg01001.html

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 cfg.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 3f4bba0..b2d12f9 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -929,6 +929,13 @@ sc_prohibit_mixed_case_abbreviations:
 	halt='Use PCI, USB, SCSI, not Pci, Usb, Scsi'	\
 	  $(_sc_search_regexp)

+sc_prohibit_empty_first_line:
+	@awk 'BEGIN { fail=0; }                                        \
+	FNR == 1 { if ($$0 == "") { print FILENAME:1:; fail=1; } }     \
+	END { if (fail == 1) {                                         \
+	  print "$(ME): Prohibited empty first line" > "/dev/stderr";  \
+	} exit fail; }' $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$');
+
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null

-- 
1.9.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]