bugLaTeX semantic checker - Bugs: bug #45979, Return code should match whether...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #45979: Return code should match whether warnings were found

Submitted by:  Ivan Andrus <gvol>
Submitted on:  Wed 16 Sep 2015 04:55:36 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Ivan Andrus <gvol>
Open/Closed: Closed

Sun 05 Jun 2016 02:42:42 PM UTC, comment #3:

I'm running into this same issue and I can't figure out why I'm still getting a non-zero exit code. For example, the following file checks out OK:

$ chktex introduction.tex
ChkTeX v1.7.5 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with PCRE regex support.
No errors printed; No warnings printed; No user suppressed
warnings; No line suppressed warnings.

but,

$ echo $?
1

I'm trying to use this as part of a makefile-based test suite ("make check") for my LaTeX project and the nonzero exit code causes the test suite to fail.

Michael Orlitzky <mjo>
Mon 25 Apr 2016 02:08:50 PM UTC, comment #2:

LyX, a LaTeX front-end that integrates with chktex, currently assumes that any non-zero exit code indicates the program was not able to run successfully (and therefore doesn't look at the generated log file). Given the code change mentioned on this issue, how should a user of chktex differentiate easily between (a) chktex couldn't run successfully (e.g., file not found), and (b) chktex ran successfully and found rule matches (e.g., warnings or errors) in the document? Some applications might even want to know the most severe type of rule found among errors, warnings, and msgs (though, perhaps looking through the log file is sufficient).

Brian Quistorff <bquistorff>
Thu 17 Sep 2015 03:42:57 AM UTC, comment #1:

Fixed in revisions 282--284.

Ivan Andrus <gvol>
Project AdministratorIn charge of this item.
Wed 16 Sep 2015 04:55:36 PM UTC, original submission:

Reported by Holger Mitschke, who wants to use chktex in a git commit hook. The following doesn't work since the return status if 0 if any file was checked regardless of whether there were warnings.

chktex -g -l chktexrc manuscript.tex 2> /dev/null && echo "SUCCESS" || echo "ERRORS"

Ivan Andrus <gvol>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mjo (Posted a comment)
  • -unavailable- added by bquistorff (Posted a comment)
  • -unavailable- added by gvol (Submitted the item)
  • -unavailable- added by gvol
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 17 Sep 2015 03:43:11 AM UTCgvolOpen/ClosedOpen=>Closed
    Thu 17 Sep 2015 03:42:57 AM UTCgvolStatusConfirmed=>Fixed
    Wed 16 Sep 2015 04:55:36 PM UTCgvolCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1