bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Syntax check rules broken if 'exclude' is not defined


From: Daniel P. Berrange
Subject: Syntax check rules broken if 'exclude' is not defined
Date: Thu, 29 Mar 2012 14:17:34 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

I noticed that many (most) of the libvirt syntax-check rules were not
generating any results, despite me introducing obvious violations.

>From my debugging the problem appears to be caused by this commit:

  commit 727075d03c670affa68f71313979781f5ba9bbfc
  Author: Eric Blake <address@hidden>
  Date:   Thu Mar 1 14:51:31 2012 -0700

    maint.mk: add per-line exclusions to prohibitions


If I revert the following hunk from maint.mk


@@ -258,6 +268,7 @@ define _sc_search_regexp
    if test -n "$$files"; then                                          \
      if test -n "$$prohibit"; then                                     \
        grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
+         | grep -vE "$${exclude-^$$}"                                  \
          && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
      else                                                              \
        grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \


then the syntax-check rules work again. It seems that this grep is
broken, if a test leaves  $exclude undefined, causing it to filter
out all results.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]