I know this behavior well.
I conclude that it's not a bug (a behavior to be fixed), but a limitation (a behavior not to be fixed).
As it is very complicated, I'm not sure I can exactly explain the details (I know my English is poor). But I try that:
- Post build steps (Publisher) displays links in the left side of project pages by implementing Publisher#getProjectActions.
- You can use each Publisher at most only once in a project. For example, if you added "Archiving artifacts" to a project, you cannot add more new "Archiving artifacts" to that project.
- Using Flexible Publish, you can define a same Publisher for multiple times. This is an irregular case. For example, you can add two "Archiving artifacts" for condition A and condition B. This results Publisher#getProjectActions of a same Publisher are called multiple times for a project. This results duplicated links in a project page.
- As described before, Publisher should be defined only one in a project. So it's not a bug of Publisher to display duplicated links.
- At the same time, Flexible Publish does not know how to handle links. Those links may be better to be displayed for each definition, or may be better to be displayed only once (like Warnings plugin).
As far as I know, this behavior doesn't results harmful, and I don't plan to fix it.
If you try to fix that, the way of SubProjectsAction of parameterized-trigger plugin may be helpful.
https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/java/hudson/plugins/parameterizedtrigger/SubProjectsAction.java
https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/resources/hudson/plugins/parameterizedtrigger/SubProjectsAction/jobMain.groovy
If multiple {{SubProjectsAction}}s are defined to a build, it aggregates all {{SubProjectsAction}}s to display.
I think aggregating WarningsProjectAction and displaying a link only for the first one would fix the behavior.
But it would get so complicated, and may cause other problems.
And you need to fix not warnings-plugin, but analysis-core-plugin. It may affect other plugins using analysis-core-plugin.
Did you use the same parser twice? This is not yet supported: see
JENKINS-18708.