Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64354

Customize severity for PC-Lint

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Severities for existing analyzers (e.g. PC-Lint) are "hardcoded" (found here)

      It would be helpful to custom assing severity for message categories.

      Example: I would like to distinguish between "info" and "note" category - today both of these are mapped to Severity.WARNING_LOW

        Attachments

          Issue Links

            Activity

            Hide
            drulli Ulli Hafner added a comment -

            Do you want that feature in general or just for PC-Lint? How would such a customization work? Is this topic already covered by JENKINS-52990 and JENKINS-55571 or do you have something different in mind?

            Show
            drulli Ulli Hafner added a comment - Do you want that feature in general or just for PC-Lint? How would such a customization work? Is this topic already covered by JENKINS-52990 and JENKINS-55571 or do you have something different in mind?
            Hide
            franky Frank Mathis added a comment -

            From my point of view it is only relevant for PC-Lint.

            The mentioned improvement requests are similar but are going way further: They would like to treat messages from the same category differently. My "issue" is that two different categories are treated the same.

            What I have in mind (without have knowledge how the plugin works under the hood)

            Call of recordIssues with parameters to assign severities like:

            recordIssues tool: pcLint(name: "PC-Lint Plus", pattern: 'pclint.log', note: Severity.WARNING_LOW, info: Severity.WARNING_NORMAL)
            
            Show
            franky Frank Mathis added a comment - From my point of view it is only relevant for PC-Lint. The mentioned improvement requests are similar but are going way further: They would like to treat messages from the same category differently. My "issue" is that two different categories are treated the same. What I have in mind (without have knowledge how the plugin works under the hood) Call of recordIssues with parameters to assign severities like: recordIssues tool: pcLint(name: "PC-Lint Plus" , pattern: 'pclint.log' , note: Severity.WARNING_LOW, info: Severity.WARNING_NORMAL)
            Hide
            drulli Ulli Hafner added a comment - - edited

            So there are multiple ways to implement:

            1. Change the current guessing for PC Lint and use a custom mapping with your mapping idea (this means that all other users might not be very happy if their priority changes in the new release). 
            2. Add a boolean flag to the parser that decides whether to map note to Severity.WARNING_LOW 
            3. Create a full featured mapping that maps categories to priorities and exposes those details in the API (your example above)
            Show
            drulli Ulli Hafner added a comment - - edited So there are multiple ways to implement: Change the current guessing for PC Lint and use a custom mapping with your mapping idea (this means that all other users might not be very happy if their priority changes in the new release).  Add a boolean flag to the parser that decides whether to map note to  Severity.WARNING_LOW   Create a full featured mapping that maps categories to priorities and exposes those details in the API (your example above)
            Hide
            franky Frank Mathis added a comment -

            When I had to guess I would say number 2 is the easiest solution, isn't it?  I could live with that!

            Now when I review the severities there seems to be another flaw for PC-Lint:

            Warning levels are defined like that (from most severe to least severe)

            • Error
            • Warning
            • Info
            • Note

            according to that severities should be

            • Error -> Severity.ERROR
            • Warning -> Severity.WARNING_HIGH
            • Info -> Severity.WARNING_NORMAL
            • Note -> Severity.WARNING_LOW

            Conclusion: Right now, from a lint point of view: notes and warnings are "misaligned"

             

            Show
            franky Frank Mathis added a comment - When I had to guess I would say number 2 is the easiest solution, isn't it?  I could live with that! Now when I review the severities there seems to be another flaw for PC-Lint: Warning levels are defined like that (from most severe to least severe) Error Warning Info Note according to that severities should be Error -> Severity.ERROR Warning -> Severity.WARNING_HIGH Info -> Severity.WARNING_NORMAL Note -> Severity.WARNING_LOW Conclusion: Right now, from a lint point of view: notes and warnings are "misaligned"  
            Hide
            drulli Ulli Hafner added a comment -

            Well, other users (or tools) may see this differently. But anyway, I think heading for solution 2 is the easiest way. Are you interested in providing a PR?

            Show
            drulli Ulli Hafner added a comment - Well, other users (or tools) may see this differently. But anyway, I think heading for solution 2 is the easiest way. Are you interested in providing a PR?
            Hide
            franky Frank Mathis added a comment -

            I'm afraid I am not able to provide a PR. Neither am I a Java developer nor have I a deeper understanding how your amazing plugin works

            Show
            franky Frank Mathis added a comment - I'm afraid I am not able to provide a PR. Neither am I a Java developer nor have I a deeper understanding how your amazing plugin works

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              franky Frank Mathis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: