Add syntax check to validate capitalization of abbreviations

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>
This commit is contained in:
Daniel P. Berrange 2014-03-13 12:00:16 +00:00
parent 3cfa19da22
commit 25d5d7057d

9
cfg.mk
View File

@ -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)$$