• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • warnings-plugin
    • None

      StyleCop warnings are counted twice. Once in the MSBuild warnings, and once more in the StyleCop warnings. Can the MSBuild parser be changed to ignore StyleCop warnings?

          [JENKINS-29203] StyleCop warnings are counted twice

          Ulli Hafner added a comment -

          If the warnings can be differentiated by a simple pattern then these warnings could be excluded from the MsBuildParser.

          But wouldn't it be simpler to just remove the StyleCop parser from your job configuration? Or does the parser produce better results? Or is there an option to disable the duplicated output in msbuild?

          Ulli Hafner added a comment - If the warnings can be differentiated by a simple pattern then these warnings could be excluded from the MsBuildParser. But wouldn't it be simpler to just remove the StyleCop parser from your job configuration? Or does the parser produce better results? Or is there an option to disable the duplicated output in msbuild?

          All of the StyleCop error #'s begin with SA. They should be easy to separate. We would like them separate so that we can treat the MSBuild warnings with greater severity (possibly fail the build).

          Michael Fowler added a comment - All of the StyleCop error #'s begin with SA. They should be easy to separate. We would like them separate so that we can treat the MSBuild warnings with greater severity (possibly fail the build).

          Ulli Hafner added a comment - - edited

          Then either the regular expression needs to be adapted or in the createWarning method should return FALSE_POSITIVE for these warnings. Interested in providng a pull request? The changes should be straight forward to MsBuildParser and the test case.

          Ulli Hafner added a comment - - edited Then either the regular expression needs to be adapted or in the createWarning method should return FALSE_POSITIVE for these warnings. Interested in providng a pull request? The changes should be straight forward to MsBuildParser and the test case .

          I don't think that the behavior of the MSBuild parser should be changed hard coded to filter warnings from StyleCop, because this is not a problem with the MSBuild parser. StyleCop just produces output that is conform to the MSBuild warning/error system which I assume is intended by the StyleCop delevopers.
          Maybe a configureable regular expression would make sense to filter unwanted warnings/errors in certain situations.

          Artur Lipinski added a comment - I don't think that the behavior of the MSBuild parser should be changed hard coded to filter warnings from StyleCop, because this is not a problem with the MSBuild parser. StyleCop just produces output that is conform to the MSBuild warning/error system which I assume is intended by the StyleCop delevopers. Maybe a configureable regular expression would make sense to filter unwanted warnings/errors in certain situations.

          Ulli Hafner added a comment -

          You can exclude certain warnings by a regexp (based on the message).

          Ulli Hafner added a comment - You can exclude certain warnings by a regexp (based on the message).

            drulli Ulli Hafner
            mdkf Michael Fowler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: