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

Automatically set fileName and lineStart in groovy parsers

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None

      When the plugin invokes a user provided groovy based parser, it injects the builder, matcher, fileName and lineNumber variables. However, it's currently in the responsibility of the user to actually use those injected variables by calling the builder API. Since that's not well known, the plugin should check whether a file name and a line number have been set on the parser return value, and just add them if they are missing.

      That way all existing custom builders would benefit from having a link to the analyzed source by default. Right now most custom parsers probably don't have such a link, as it requires the knowledge of the undocumented injected variables. I've created a PR to document them: https://github.com/jenkinsci/warnings-ng-plugin/pull/1879, but setting them by default might be even more useful.

            drulli Ulli Hafner
            bananeweizen Michael Keppler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: