maint.mk: add per-line exclusions to prohibitions
authorEric Blake <eblake@redhat.com>
Thu, 1 Mar 2012 21:51:31 +0000 (14:51 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 1 Mar 2012 22:05:17 +0000 (15:05 -0700)
commit727075d03c670affa68f71313979781f5ba9bbfc
tree7ea4e0aed7df28c1d65698954fa3419ed1238aea
parent30c9ce0b97ddce4f460c00ba39f12485ddfb7c72
maint.mk: add per-line exclusions to prohibitions

_sc_search_regexp would let you skip entire files, but not
individual lines, until now.  As proof that adding in a new
per-line regex exception mechanism is useful, I found three
syntax checks that were previously open-coded, only because
they had to exclude individual lines.

The exclude filtering is done on 'file:line:contents' output
from grep, rather than the original files, so filtering for
empty lines is a no-op, and searching for contents anchored
at the beginning of the line in the original file should
instead be anchored against ':' at the time of the filtering.

* maint.mk (_sc_search_regexp): Add $exclude parameter.
(sc_prohibit_strcmp, sc_unmarked_diagnostics)
(sc_const_long_option): Use it.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
top/maint.mk