• Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None
    • Warnings-NG v1.0.1

      I am using the warnings-ng plugin for checking a.o. the log of the TI (Texas Instruments) compiler. Unfortunately all warnings are treated equally wheras I would like to distinguish for example a 'variable declared but not used' from a 'shift count too large'.
      As an error is a build failure, I am currently left with a list of (only) warnings, all thrown together.

      Would it be possible to overrule the classification for a given parser?

          [JENKINS-55571] overrule parser classifications

          Ulli Hafner added a comment - - edited

          Wouldn't it make more sense to create a global mapping for all users based on some keywords in the message? I.e. the source code should be improved. Interested in providing a pull request?

          Or is your intended categorization not usable for other users?

          Ulli Hafner added a comment - - edited Wouldn't it make more sense to create a global mapping for all users based on some keywords in the message? I.e. the source code should be improved. Interested in providing a pull request? Or is your intended categorization not usable for other users?

          David Riemens added a comment -

          I'm not sure if everyone would have the same prio view as we have.

          The warnings emitted are like:

             "<srcfile>", line <nr>: warning #179-D: variable "some_var" was declared ...
             "<srcfile>", line <nr>: warning #64-D: shift count is too large

          Which I personally would classify as different severities.
          It would be nice if it were poossible to supply maybe a 'classification overrules' file per compiler containing a means to overruled the default assigned severity by means of a regex ?

          In that way anyone can use the mechanism for any compiler, while keeping a relative simple implementation.

          I'm not sure if I would be the best person to implement a patch (esp if it is Java code); I've never coded anything in a plugin... which code precisely are you referring to that could be improved ?

           

          David Riemens added a comment - I'm not sure if everyone would have the same prio view as we have. The warnings emitted are like:    "<srcfile>", line <nr>: warning #179-D: variable "some_var" was declared ...    "<srcfile>", line <nr>: warning #64-D: shift count is too large Which I personally would classify as different severities. It would be nice if it were poossible to supply maybe a 'classification overrules' file per compiler containing a means to overruled the default assigned severity by means of a regex ? In that way anyone can use the mechanism for any compiler, while keeping a relative simple implementation. I'm not sure if I would be the best person to implement a patch (esp if it is Java code); I've never coded anything in a plugin... which code precisely are you referring to that could be improved ?  

          Ulli Hafner added a comment -

          The code is a link

          Ulli Hafner added a comment - The code is a link

          Ulli Hafner added a comment - - edited

          If we make this not part of the distribution: what would be a good way to provide such a mapping? A configuration file, a UI, etc.?

          Ulli Hafner added a comment - - edited If we make this not part of the distribution: what would be a good way to provide such a mapping? A configuration file, a UI, etc.?

          David Riemens added a comment -

          my preference would be a (optional) config file. Not sure if there is some kind of standard for config files (XML,INI, ...)?

          The config file would contain a set of rules with afaict a regexp and the classification that should give. I would opt for implementation where the first rule-match defines the result. Something like a if/elif list construct. And no match then gives the currently implemented default.

          David Riemens added a comment - my preference would be a (optional) config file. Not sure if there is some kind of standard for config files (XML,INI, ...)? The config file would contain a set of rules with afaict a regexp and the classification that should give. I would opt for implementation where the first rule-match defines the result. Something like a if/elif list construct. And no match then gives the currently implemented default.

            drulli Ulli Hafner
            monger39 David Riemens
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: