aboutsummaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-09-12 10:54:42 -0600
committerEric Blake <eblake@redhat.com>2012-09-12 11:55:29 -0600
commit2387aa26c1671330fd9159cc9c31d22f39397870 (patch)
treeda94365717776de630fc4f74ad26dabe7aedc2fc /cfg.mk
parentbuild: avoid confusing make with raw name 'undefine' (diff)
downloadlibvirt-2387aa26c1671330fd9159cc9c31d22f39397870.tar.gz
libvirt-2387aa26c1671330fd9159cc9c31d22f39397870.tar.bz2
libvirt-2387aa26c1671330fd9159cc9c31d22f39397870.zip
maint: fix missing spaces in message
I got an off-list report about a bad diagnostic: Target network card mac 52:54:00:49:07:ccdoes not match source 52:54:00:49:07:b8 True to form, I've added a syntax check rule to prevent it from recurring, and found several other offenders. * cfg.mk (sc_require_whitespace_in_translation): New rule. * src/conf/domain_conf.c (virDomainNetDefCheckABIStability): Add space. * src/esx/esx_util.c (esxUtil_ParseUri): Likewise. * src/qemu/qemu_command.c (qemuCollectPCIAddress): Likewise. * src/qemu/qemu_driver.c (qemuDomainSetMetadata) (qemuDomainGetMetadata): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeNetBridge): Likewise. * src/rpc/virnettlscontext.c (virNetTLSContextCheckCertDNWhitelist): Likewise. * src/vmware/vmware_driver.c (vmwareDomainResume): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives): Avoid false negatives. * tools/virsh-domain.c (info_save_image_dumpxml): Reword. Based on a report by Luwen Su.
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index bca363c1f..0dd58df7a 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -597,6 +597,15 @@ sc_prohibit_useless_translation:
halt='no translations in tests or examples' \
$(_sc_search_regexp)
+# When splitting a diagnostic across lines, ensure that there is a space
+# or \n on one side of the split.
+sc_require_whitespace_in_translation:
+ @grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \
+ | sed -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \
+ -e '/_(.*[^\ ]""[^\ ]/p' | grep . && \
+ { echo '$(ME): missing whitespace at line split' 1>&2; \
+ exit 1; } || :
+
# Enforce recommended preprocessor indentation style.
sc_preprocessor_indentation:
@if cppi --version >/dev/null 2>&1; then \