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

Remove integration with Static Analysis Utilities plugin

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • email-ext-plugin
    • None
    • 2.82

      This plugin currently depends on Static Analysis Utilities, which is EOL and replaced by Warnings Next Generation.

          [JENKINS-55744] Remove integration with Static Analysis Utilities plugin

          Ben Spoor added a comment -

          We would like to mail our developers with an overview of the results in a mail. Currently we use the analysis-core results in a jelly template based on the jelly html template src/main/resources/hudson/plugins/emailext/templates/static-analysis.jelly. }}We iterate over the {{it.staticAnalysisActions and create a table with all the separate results per analysis tool.

          • In light of this task, is there an alternative to use the warnings-ng results from the jelly?{{}}

          Ben Spoor added a comment - We would like to mail our developers with an overview of the results in a mail. Currently we use the analysis-core results in a jelly template based on the jelly html template src/main/resources/hudson/plugins/emailext/templates/static-analysis.jelly. }}We iterate over the {{it.staticAnalysisActions and create a table with all the separate results per analysis tool. In light of this task, is there an alternative to use the warnings-ng results from the jelly?{{}}

          James Howe added a comment -

          Any word on whether/when this might be done?
          My main interest at the moment is no longer needing to have the old plugins installed.

          James Howe added a comment - Any word on whether/when this might be done? My main interest at the moment is no longer needing to have the old plugins installed.

          Alex Earl added a comment -

          I haven't had a chance to work on it yet. I will get to it soon hopefully.

          Alex Earl added a comment - I haven't had a chance to work on it yet. I will get to it soon hopefully.

          Basil Crow added a comment -

          The relevant code gets all actions of type hudson.plugins.analysis.core.AbstractResultAction or hudson.plugins.analysis.core.MavenResultAction:

          /**
           * Returns all build actions that derive from {@link AbstractResultAction}.
           * Every action represents a single analysis result.
           *
           * @param build the build to get the actions for
           * @return The static analysis actions for the specified build. The returned
           * list might be empty if there are no such actions.
           */
          public List<Action> getActions(Run<?, ?> build) {
              ArrayList<Action> actions = new ArrayList<>();
              for (Action action : build.getActions(Action.class)) {
                  if (AbstractResultAction.class.isInstance(action) || MavenResultAction.class.isInstance(action)) {
                      actions.add(action);
                  }
              }
              return actions;
          }
          

          drulli, would you mind pointing me to the equivalent classes in the new static analysis framework?

          Basil Crow added a comment - The relevant code gets all actions of type hudson.plugins.analysis.core.AbstractResultAction or hudson.plugins.analysis.core.MavenResultAction : /** * Returns all build actions that derive from {@link AbstractResultAction}. * Every action represents a single analysis result. * * @param build the build to get the actions for * @ return The static analysis actions for the specified build. The returned * list might be empty if there are no such actions. */ public List<Action> getActions(Run<?, ?> build) { ArrayList<Action> actions = new ArrayList<>(); for (Action action : build.getActions(Action.class)) { if (AbstractResultAction. class. isInstance(action) || MavenResultAction. class. isInstance(action)) { actions.add(action); } } return actions; } drulli , would you mind pointing me to the equivalent classes in the new static analysis framework?

          Basil Crow added a comment -

          Deprecation Warning

          As of Email Extension 2.78, integration with the Static Analysis Utilities plugin has been deprecated in the Email Extension plugin and will be removed in a future release. Ideally, this removal will take place after the Email Extension plugin gains integration with the Warnings Next Generation plugin (pull requests welcome!) to avoid dropping this functionality.

          Basil Crow added a comment - Deprecation Warning As of Email Extension 2.78 , integration with the Static Analysis Utilities plugin has been deprecated in the Email Extension plugin and will be removed in a future release. Ideally, this removal will take place after the Email Extension plugin gains integration with the Warnings Next Generation plugin (pull requests welcome!) to avoid dropping this functionality.

          Basil Crow added a comment -

          I am currently planning on removing Email Extension's integration with the Static Analysis plugin in the first quarter of 2021, regardless of whether or not anyone submits a pull request to add integration with the Warnings Next Generation plugin.

          Basil Crow added a comment - I am currently planning on removing Email Extension's integration with the Static Analysis plugin in the first quarter of 2021, regardless of whether or not anyone submits a pull request to add integration with the Warnings Next Generation plugin.

          Basil Crow added a comment -

          It has now been about 4 months since integration with the Static Analysis Utilities plugin was deprecated, and I have received neither any pull requests to add integration with the Warnings Next Generation plugin nor any pleas from users to retain this deprecated feature. Therefore, as promised, I have removed integration with the Static Analysis Utilities plugin.

          Basil Crow added a comment - It has now been about 4 months since integration with the Static Analysis Utilities plugin was deprecated, and I have received neither any pull requests to add integration with the Warnings Next Generation plugin nor any pleas from users to retain this deprecated feature. Therefore, as promised, I have removed integration with the Static Analysis Utilities plugin.

          René Scheibe added a comment -

          Thanks for the change basil.

          I am looking forward for this to be released.

          Currently this plugin cannot be downloaded with https://github.com/jenkinsci/plugin-installation-manager-tool because of the missing "analysis-core" dependency.

          René Scheibe added a comment - Thanks for the change basil . I am looking forward for this to be released. Currently this plugin cannot be downloaded with https://github.com/jenkinsci/plugin-installation-manager-tool  because of the missing "analysis-core" dependency.

          Basil Crow added a comment -

          Thanks for pointing this out, renescheibe. I will do a release of Email Extension sometime this week.

          Basil Crow added a comment - Thanks for pointing this out, renescheibe . I will do a release of Email Extension sometime this week.

          Basil Crow added a comment -

          Released in 2.82.

          Basil Crow added a comment - Released in 2.82 .

            basil Basil Crow
            jameshowe James Howe
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: