While I was in the virtual vicinity,
Jiri mentioned the possibility of detecting one more minor
formatting problem: the stray newline at the end of a diagnostic.
Here are two corrections and the heuristic that caught them
(and that will prevent introduction of some new ones -- but not if the
end of the message is more than 2 lines after the function name).
Currently there are no false positives.
From 122b1e31fb33c092a53802b56a0f2f5586c95bd5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 20 May 2010 11:12:17 +0200
Subject: [PATCH 1/2] maint: remove unwanted newline at end of diagnostic
* src/xen/xend_internal.c (xenDaemonDomainDefineXML): Remove \n.
* src/network/bridge_driver.c (networkAddMasqueradingIptablesRules):
Likewise.
From 532672f3a0c53213609dab49df2e7efcaf0eb594 Mon Sep 17 00:00:00
2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 20 May 2010 11:13:41 +0200
Subject: [PATCH 2/2] maint: prohibit newline at end of diagnostic
* cfg.mk (sc_prohibit_newline_at_end_of_diagnostic): New rule.
Idea proposed by Jiri Denemark.
ACK to both patches.
While the syntax check implementation is not perfect, it's good enough for now
and can be enhanced if there is a desperate need for that.
Jirka