#169834 linklint: different exit codes

#169834#5
Date:
2002-11-20 01:27:56 UTC
From:
To:
it would be very useful if linklint would use different exit codes
for "everything is fine" vs. "some warnings/errors".

regards
az

#169834#10
Date:
2002-11-20 09:17:47 UTC
From:
To:
Hi Alexander,

IMHO having a non-zero return code when warnings are encountered (as
do 'tidy', for instance) is very painful because it breaks 'make' runs;
having non-zero return code with errors looks like a good idea.

Denis

#169834#15
Date:
2002-11-20 09:37:42 UTC
From:
To:
On Wed, 20 Nov 2002 10:17:47 +0100, Denis Barbier writes:

I'm not completely agreeing :-)

If an exit code is returned, then you can still ignore
it *really* easily - just do '|| true' or use -linklint in a Makefile.

As of now the only way to figure out whether everything is ok is to
parse the summary.
This is wasteful and just not good if you want to run linklint
periodically from cron and have an email alert if and when there
is a problem.

(By problem I mean both errors like dead links as well as warning-stuff.)

regards
az

#169834#20
Date:
2002-11-20 19:53:48 UTC
From:
To:
Alexander Zangerl once said:
counted in the summary.   If we change the exit status as suggested
then might not some working scripts or makefiles break?  We could
add a flag to change the exit status.    Here are three possibilities:

  (A) Just make the change so LinkLint always exits with an error code
      if there were any errors or warnings (as counted in summary).

  (B) Add (yet another) flag -exit_error (or something).  Without this
      command line flag LinkLint acts as it does now.  With this flag
      you get the behaviour as in (A) above.

  (C) Add two command line flags with numerical parameters:

        -exit_error  0     -exit_warning 3

      This would say to give error exit code if there was any error
      (error count > 0) or if there were more than 3 warnings.  This
      way the user can have a quiescent state that has some errors or
       warnings that she is choosing to ignore.

Any thoughts?

#169834#25
Date:
2002-11-20 23:54:03 UTC
From:
To:
On Wed, 20 Nov 2002 11:53:48 PST, Jim Bowlin writes:

Ah yes, sorry that this was not made clear earlier.
Yes, I meant "linklint detects errors on your pages".

(I take it as pretty much granted that any program exits with a meaningful
indication when its task could not be fulfilled.)

Sounds like a good, workable idea; that way backwards-compatibility
is maintained, and the functionality I'd like to see is available as well.

regards
az