]> xenbits.xensource.com Git - libvirt.git/commitdiff
Add syntax check to validate capitalization of abbreviations
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 13 Mar 2014 12:00:16 +0000 (12:00 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 8 Apr 2014 10:15:55 +0000 (11:15 +0100)
Use a syntax-check rule to force PCI, USB and SCSI instead
of Pci, Usb and Scsi.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 4a53f2bb2832d3490fa87a24ed4ba065118fe04e..8a444d646ccb3019f6ec6d5e9f11ca1ca01a557a 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -917,6 +917,12 @@ sc_prohibit_windows_special_chars_in_filename:
        test -n "$$files" && { echo '$(ME): Windows special chars'     \
          'in filename not allowed:' 1>&2; echo $$files 1>&2; exit 1; } || :
 
+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
 
@@ -1089,3 +1095,6 @@ exclude_file_name_regexp--sc_prohibit_getenv = \
 
 exclude_file_name_regexp--sc_avoid_attribute_unused_in_header = \
   ^src/util/virlog\.h$$
+
+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)$$