[PATCH 4/4] Add syntax check to validate capitalization of abbreviations

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

 



Use a syntax-check rule to force PCI, USB and SCSI instead
of Pci, Usb and Scsi.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 cfg.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 9ad8cf7..f61ccfc 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -887,6 +887,11 @@ sc_prohibit_wrong_filename_in_comment:
 	    'actual file name' 1>&2; exit 1; }	                       \
 	fi;
 
+sc_prohibit_mixed_case_abbreviations:
+	@prohibit='Pci|Usb|Scsi'			\
+	in_vc_files='\.[ch]$$'				\
+	halt='Use PCI, USB, SCSI, not Pci, Usb, Scsi'	\
+	  $(_sc_search_regexp)
 
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
@@ -1057,3 +1062,6 @@ exclude_file_name_regexp--sc_prohibit_int_ijk = \
 
 exclude_file_name_regexp--sc_prohibit_getenv = \
   ^tests/.*\.[ch]$$
+
+exclude_file_name_regexp--sc_prohibit_mixed_case_abbreviations = \
+  ^src/(vbox/vbox_CAPI.*.h|esx/esx_vi.(c|h)|esx/esx_storage_backend_iscsi.c)$$
-- 
1.8.5.3

--
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]