Re: checklink: suppress expected errors to avoid false positive warnings

Ville-

Thanks for your suggestions, and for your support of the enhancement in
general.

> (I don't mind discussing these 
> things here on the www-validator mailing list, but I think a better suited 
> place would be either the public-qa-dev mailing list or W3C Bugzilla).

That's fine with me -- choose one of the two and let's move the discussion
there.  I sent my message to the www-validator mailing list because of this
comment at the top of checklink itself:

  # Comments and suggestions should be sent to the www-validator mailing list:
  #       www-validator@w3.org (with 'checklink' in the subject)
  #       http://lists.w3.org/Archives/Public/www-validator/ (archives)

so you might want to clarify that as well.

> Because the patch contains two different things (modification of existing 
> exclude-docs functionality, and addition of new options), could you split it 
> into two patches?

OK, I'll do that.

> The patch appears to drop precompilation and error repoting of the 
> exclude-docs regexp.  I don't think that's a good idea

I agree entirely.  Could you write this at least for for the exclude-docs
regexp?  It should be quick for you, but it would take me too long to
re-learn Perl's rather arcane syntax for nested data structures.  You can
send that to me and I'll insert it.

> I think options that can be specified multiple times should be initialized to 
> an empty array ([]) instead of undef, for cleanliness reasons and because 
> that way there's no need to check their definedness later on.

OK, I'll do that.

> I don't like the wildly varying separator characters in option values (->, :, 
> #).  Better would be consistent, and we already have the space char used 
> in --masquerade so I suggest using space for the new options as well.

I think the current separator characters consistent and readable.  For
instance, if we want to suppress warnings about links to

  http://foo.com/bar.html#baz

then it appears that way in the option rather than as the less readable

  http://foo.com/bar.html baz

Likewise, -> is exactly the character sequence that checklink currently
uses to print out the directory redirect warning message, so writing it
that way in the option makes sense.

These intuitive, easy-to-recognize separator characters are consistent with
the checklink output.  I think that replacing them by spaces would make the
options more difficult and error-prone to read and write.

> In addition to the --help output, bin/checklink.pod in CVS needs to be updated 
> too.

Good point.  My patch was originally created and submitted when the pod
documentation was at the end of the checklink script itself, so those
changes got lost during this resubmission.  I'll do this.

> I think --exclude-* is not necessarily the best prefix ...  I 
> think --suppress-* (and Suppress_* in code) could be more appropriate.

I agree, and I may have originally proposed that many years ago when
I first created the patches.  I'm happy to make this change.

> Instead of adding a bunch of --suppress options I'd personally rather see 
> a "strictly one line per warning/error" output mode added.
> ...
> I think this output mode would be a lot more work than 
> adding the few suggested options though.  The options can be added now and 
> possibly deprecated/removed later if something better emerges - think of this 
> just as food for thought.

This is an interesting and potentially useful proposal, but I agree it can
be deferred for now.

                    -Mike

Received on Monday, 20 October 2008 07:48:18 UTC