Richard W.M. Jones wrote: > On Mon, Sep 17, 2012 at 10:47:52AM +0200, Jim Meyering wrote: >> >> trailing_blank >> >> TODO:405: - swap devices (both of block device and file) should be >> > wiped. This may >> >> Binary file tests/guests/guest-aux/windows-software matches >> >> Binary file tests/guests/guest-aux/windows-system matches >> >> tools/virt-win-reg:711: >> >> maint.mk: found trailing blank(s) >> >> make: *** [sc_trailing_blank] Error 1 >> > >> > Binary files should probably not be matched. >> >> Hey! >> I've just realized that I can easily filter out those lines. >> Here's yet another patch. >> We should be able to use a similar change for a few other rules. >> >> diff --git a/top/maint.mk b/top/maint.mk >> index 4627bc5..ccf09a2 100644 >> --- a/top/maint.mk >> +++ b/top/maint.mk >> @@ -724,6 +724,7 @@ sc_require_test_exit_idiom: >> sc_trailing_blank: >> @prohibit='[ ]$$' \ >> halt='found trailing blank(s)' \ >> + exclude='^Binary file .* matches$$' \ >> $(_sc_search_regexp) >> >> # Match lines like the following, but where there is only one space > > Yes, this works to exclude the false binary matches.
Thanks for testing those. I've pushed the changes to gnulib: Subject: 0/4: syntax-check: tweak for fewer false positives Newsgroups: gmane.comp.lib.gnulib.bugs Richard W.M. Jones went through the (tedious!) process of reviewing all of libguestfs wrt gnulib's latest syntax-check rules, and reported many false positives. In a few cases, I found ways to avoid entire classes of false positives: 1/4 maint.mk: relax sc_prohibit_strcmp, to avoid a false positive 2/4 maint.mk: teach sc_prohibit_magic_number_exit to accept 77 3/4 maint.mk: sc_prohibit_path_max_allocation: don't FP for UNIX_PATH_MAX 4/4 maint.mk: exempt trailing blanks found in "binary" files _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs