[libvirt] [PATCH 2/2] syntax-check: mandate space after mid-line semicolon
Martin Kletzander
mkletzan at redhat.com
Sat May 25 21:13:51 UTC 2013
On 05/24/2013 07:19 PM, Eric Blake wrote:
> Enforce the style cleanup in the previous patch.
>
> * build-aux/bracket-spacing.pl: Enforce trailing spacing.
> * cfg.mk (bracket-spacing-check): Tweak error wording.
> * docs/hacking.html.in: Document the rule.
> * HACKING: Regenerate.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> HACKING | 23 +++++++++++++++++++++++
> build-aux/bracket-spacing.pl | 12 ++++++++++++
> cfg.mk | 2 +-
> docs/hacking.html.in | 29 +++++++++++++++++++++++++++++
> 4 files changed, 65 insertions(+), 1 deletion(-)
>
[...]
> diff --git a/build-aux/bracket-spacing.pl b/build-aux/bracket-spacing.pl
> index 2eeeeb4..de40040 100755
> --- a/build-aux/bracket-spacing.pl
> +++ b/build-aux/bracket-spacing.pl
> @@ -1,6 +1,7 @@
> #!/usr/bin/perl
> #
> # bracket-spacing.pl: Report any usage of 'function (..args..)'
> +# Also check for other syntax issues, such as correct use of ';'
> #
> # This library is free software; you can redistribute it and/or
> # modify it under the terms of the GNU Lesser General Public
> @@ -31,6 +32,9 @@ foreach my $file (@ARGV) {
> while (defined (my $line = <FILE>)) {
> my $data = $line;
>
> + # Kill any quoted ; or "
> + $data =~ s,'[";]','X',g;
> +
Good catch, I didn't know this was missing.
[...]
ACK,
Martin
More information about the libvir-list
mailing list