Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dependabot/maven/io…
Browse files Browse the repository at this point in the history
….jenkins.plugins-analysis-model-api-11.13.0
  • Loading branch information
uhafner committed Nov 18, 2023
2 parents 5ff87dc + 3c94786 commit 2b11a23
Show file tree
Hide file tree
Showing 43 changed files with 314 additions and 166 deletions.
7 changes: 2 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ updates:
- dependency-name: org.eclipse.collections:eclipse-collections-api
versions:
- ">= 10.a"
- dependency-name: org.webjars:popper.js
- dependency-name: net.javacrumbs.json-unit:json-unit-assertj
versions:
- ">= 2.0.0"
- dependency-name: org.webjars:bootstrap
versions:
- ">= 5.0.0"
- ">= 3.0.0"

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: exactly
mode: minimum
count: 1
labels: "bug,feature,enhancement,breaking,tests,documentation,internal,dependencies"
message: "Maintainer needs to assign at least one label before merge"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2007-2022 Dr. Ullrich Hafner
Copyright (c) 2007-2023 Dr. Ullrich Hafner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Join the chat at https://gitter.im/jenkinsci/warnings-plugin](https://badges.gitter.im/jenkinsci/warnings-plugin.svg)](https://gitter.im/jenkinsci/warnings-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/warnings-ng.svg?color=red)](https://plugins.jenkins.io/warnings-ng)
[![Jenkins](https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/master/badge/icon?subject=Jenkins%20CI)](https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/master/)
[![GitHub Actions](https://github.com/jenkinsci/warnings-ng-plugin/workflows/GitHub%20CI/badge.svg?branch=master)](https://github.com/jenkinsci/warnings-ng-plugin/actions)
[![GitHub Actions](https://github.com/jenkinsci/warnings-ng-plugin/workflows/GitHub%20CI/badge.svg)](https://github.com/jenkinsci/warnings-ng-plugin/actions)
[![Codecov](https://codecov.io/gh/jenkinsci/warnings-ng-plugin/branch/master/graph/badge.svg)](https://app.codecov.io/gh/jenkinsci/warnings-ng-plugin)

The Jenkins Next Generation Warnings plugin collects compiler warnings or issues reported by static analysis tools and
Expand Down
128 changes: 126 additions & 2 deletions SUPPORTED-FORMATS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--- DO NOT EDIT - Generated by ToolsLister at 2022-11-18T23:18:43.347138-->
<!--- DO NOT EDIT - Generated by ToolsLister at 2023-10-16T16:39:39.702387-->
# Supported Report Formats

Jenkins' Warnings Next Generation Plugin supports the following report formats.
Expand Down Expand Up @@ -467,6 +467,25 @@ the [Analysis Parsers Library](https://github.com/jenkinsci/analysis-model/).
-
</td>
</tr>
<tr>
<td>
code-generator
</td>
<td>
codeGeneratorParser()
</td>
<td>
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/triangle-exclamation.svg" alt="Code Generator Tool" height="48" width="48">
</td>
<td>
<a href="https://www.mathworks.com/help/stats/code-generation.html">
Code Generator Tool
</a>
</td>
<td>
-
</td>
</tr>
<tr>
<td>
code-checker
Expand Down Expand Up @@ -581,6 +600,25 @@ the [Analysis Parsers Library](https://github.com/jenkinsci/analysis-model/).
:bulb: You need to use the Eclipse format with the option <code>--output=eclipse</code>
</td>
</tr>
<tr>
<td>
crosscore-embedded-studio
</td>
<td>
CrossCoreEmbeddedStudioParser()
</td>
<td>
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/triangle-exclamation.svg" alt="CrossCore Embedded Studio (CCES)" height="48" width="48">
</td>
<td>
<a href="https://www.analog.com/en/design-center/evaluation-hardware-and-software/software/adswt-cces.html">
CrossCore Embedded Studio (CCES)
</a>
</td>
<td>
-
</td>
</tr>
<tr>
<td>
csslint
Expand Down Expand Up @@ -762,6 +800,25 @@ the [Analysis Parsers Library](https://github.com/jenkinsci/analysis-model/).
:bulb: <p><p>Create an output file that contains Eclipse ECJ output, in either XML or text format.</p><p>To log in XML format, specify &quot;.xml&quot; as the file extension to the -log argument:</p><p><code>java -jar ecj.jar -log &lt;logfile&gt;.xml &lt;other arguments&gt;</code></p><p>To log in text format, specify any file extension except &quot;.xml&quot; to the -log argument:</p><p><code>java -jar ecj.jar -log &lt;logfile&gt;.log &lt;other arguments&gt;</code></p></p>
</td>
</tr>
<tr>
<td>
embedded-engineer
</td>
<td>
embeddedEngineerParser()
</td>
<td>
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/triangle-exclamation.svg" alt="Embedded Engineer Tool" height="48" width="48">
</td>
<td>
<a href="https://www.lieberlieber.com/embedded-engineer/">
Embedded Engineer Tool
</a>
</td>
<td>
-
</td>
</tr>
<tr>
<td>
erlc
Expand Down Expand Up @@ -1057,6 +1114,25 @@ the [Analysis Parsers Library](https://github.com/jenkinsci/analysis-model/).
-
</td>
</tr>
<tr>
<td>
grype
</td>
<td>
grype()
</td>
<td>
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/triangle-exclamation.svg" alt="Grype" height="48" width="48">
</td>
<td>
<a href="https://github.com/anchore/grype">
Grype
</a>
</td>
<td>
**/grype-report.json
</td>
</tr>
<tr>
<td>
hadolint
Expand Down Expand Up @@ -1817,6 +1893,30 @@ analyze - iccxxxxcompiler_opts cstat2.c</pre></code>For details check the IAR C-
**/pmd.xml
</td>
</tr>
<tr>
<td>
polyspace-parser
</td>
<td>
polyspaceParser()
</td>
<td>
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/triangle-exclamation.svg" alt="Polyspace Tool" height="48" width="48">
</td>
<td>
<a href="https://www.mathworks.com/products/polyspace.html">
Polyspace Tool
</a>
</td>
<td>
-
</td>
</tr>
<tr>
<td colspan="5">
:bulb: Reads reports of Polyspace Static Analysis Tool by MathWorks. Used for <a href='https://www.mathworks.com/help/bugfinder/ref/polyspaceresultsexport.html?s_tid=srchtitle_polyspace-results-export_1'>BugFinder</a> and <a href='https://www.mathworks.com/help/codeprover/ref/polyspaceresultsexport.html?s_tid=srchtitle_polyspace-results-export_2'>CodeProver</a> result files.<br/>Report can be generated with command: polyspace-results-export -format csv -results-dir <RESULTS> -output-name <CSVFILE> -key <KEY>
</td>
</tr>
<tr>
<td>
prefast
Expand Down Expand Up @@ -1930,7 +2030,7 @@ analyze - iccxxxxcompiler_opts cstat2.c</pre></code>For details check the IAR C-
</tr>
<tr>
<td colspan="5">
:bulb: <p>Create a./pylintrc that contains:<p><code>msg-template={path}:{module}:{line}: [{msg_id}({symbol}), {obj}] {msg}</code></p></p><p>Start pylint using the command:<p><code>pylint --rcfile=./pylintrc CODE > pylint.log</code></p></p>
:bulb: <p>Start Pylint using this custom message template (can also be configured via a pylintrc configuration file):<p><code>pylint --msg-template='{path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})' modules_or_packages > pylint.log</code></p></p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2153,6 +2253,30 @@ analyze - iccxxxxcompiler_opts cstat2.c</pre></code>For details check the IAR C-
-
</td>
</tr>
<tr>
<td>
simulink-check-parser
</td>
<td>
simulinkCheckParser()
</td>
<td>
<img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/triangle-exclamation.svg" alt="Simulink Check Tool" height="48" width="48">
</td>
<td>
<a href="https://www.mathworks.com/products/simulink-check.html">
Simulink Check Tool
</a>
</td>
<td>
-
</td>
</tr>
<tr>
<td colspan="5">
:bulb: Reads and Parses HTML reports of Simulink Check Tool by MathWorks. Report can be generated with command: <code>ModelAdvisor.summaryReport(ModelAdvisor.run(<SYSTEMS>, <CONFIG>, <FILENAME>, <ARGS>))</code>
</td>
</tr>
<tr>
<td>
sonar
Expand Down
4 changes: 0 additions & 4 deletions bin/german.sh

This file was deleted.

2 changes: 0 additions & 2 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ git pull
git push
cd plugin
mvn -B clean build-helper:parse-version release:prepare release:perform -DdevelopmentVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0-SNAPSHOT


Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package ${package};
* type-specific assertion objects.
*/
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM")
@javax.annotation.Generated(value="assertj-assertions-generator")
@edu.hm.hafner.util.Generated(value="assertj-assertions-generator")
public class Assertions extends edu.hm.hafner.analysis.assertions.Assertions {
${all_assertions_entry_points}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package ${package};
* Entry point for soft assertions of different data types.
*/
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM")
@javax.annotation.Generated(value="assertj-assertions-generator")
@edu.hm.hafner.util.Generated(value="assertj-assertions-generator")
public class SoftAssertions extends edu.hm.hafner.analysis.assertions.SoftAssertions {
${all_assertions_entry_points}
}
2 changes: 1 addition & 1 deletion plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.5</version>
<version>9.6</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.verb.POST;
import hudson.model.AbstractDescribableImpl;
import hudson.model.AbstractProject;
import hudson.model.BuildableItem;
import hudson.model.Descriptor;
import hudson.model.Item;
import hudson.util.FormValidation;
Expand Down Expand Up @@ -80,7 +80,7 @@ public RegexpFilterDescriptor() {
}

/**
* Performs on-the-fly validation on threshold for high warnings.
* Performs on-the-fly validation of the regexp pattern.
*
* @param project
* the project that is configured
Expand All @@ -90,7 +90,7 @@ public RegexpFilterDescriptor() {
* @return the validation result
*/
@POST
public FormValidation doCheckPattern(@AncestorInPath final AbstractProject<?, ?> project,
public FormValidation doCheckPattern(@AncestorInPath final BuildableItem project,
@QueryParameter final String pattern) {
if (!jenkinsFacade.hasPermission(Item.CONFIGURE, project)) {
return FormValidation.ok();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
import org.kohsuke.stapler.verb.POST;
import hudson.FilePath;
import hudson.model.AbstractProject;
import hudson.model.BuildableItem;
import hudson.model.Item;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.util.ComboBoxModel;
import hudson.util.FormValidation;
import jenkins.model.Jenkins;

import io.jenkins.plugins.analysis.core.model.AnalysisModelParser.AnalysisModelParserDescriptor;
import io.jenkins.plugins.analysis.core.util.ConsoleLogReaderFactory;
Expand Down Expand Up @@ -257,14 +259,11 @@ protected ReportScanningToolDescriptor(final String id) {
/**
* Returns a model with all available charsets.
*
* @param project
* the project that is configured
*
* @return a model with all available charsets
*/
@POST
public ComboBoxModel doFillReportEncodingItems(@AncestorInPath final AbstractProject<?, ?> project) {
if (JENKINS.hasPermission(Item.CONFIGURE, project)) {
public ComboBoxModel doFillReportEncodingItems() {
if (JENKINS.hasPermission(Jenkins.READ)) {
return VALIDATION_UTILITIES.getAllCharsets();
}
return new ComboBoxModel();
Expand All @@ -281,9 +280,9 @@ public ComboBoxModel doFillReportEncodingItems(@AncestorInPath final AbstractPro
* @return the validation result
*/
@POST
public FormValidation doCheckReportEncoding(@AncestorInPath final AbstractProject<?, ?> project,
public FormValidation doCheckReportEncoding(@AncestorInPath final BuildableItem project,
@QueryParameter final String reportEncoding) {
if (!JENKINS.hasPermission(Item.CONFIGURE, project)) {
if (!JENKINS.hasPermission(Jenkins.READ)) {
return FormValidation.ok();
}

Expand Down Expand Up @@ -328,7 +327,7 @@ public boolean hasDefaultPattern() {
}

/**
* Returns whether this parser can scan the console log. Typically, only line based parsers can scan the console
* Returns whether this parser can scan the console log. Typically, only line-based parsers can scan the console
* log. XML parsers should always parse a given file only.
*
* @return the parser to use
Expand All @@ -338,8 +337,8 @@ public boolean canScanConsoleLog() {
}

/**
* Returns the default filename pattern for this tool. Override if your typically works on a specific file.
* Note: if you provide a default pattern then it is not possible to scan Jenkins console log of a build.
* Returns the default filename pattern for this tool. Override if your parser typically works on a specific file.
* Note: if you provide a default pattern, then it is not possible to scan Jenkins' console log of a build.
*
* @return the default pattern
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.jenkinsci.Symbol;
import hudson.FilePath;
import hudson.model.AbstractDescribableImpl;
import hudson.model.AbstractProject;
import hudson.model.BuildableItem;
import hudson.model.Descriptor;
import hudson.model.Item;
import hudson.model.Run;
Expand Down Expand Up @@ -197,7 +197,7 @@ protected ToolDescriptor(final String defaultId) {
* @return the validation result
*/
@POST
public FormValidation doCheckId(@AncestorInPath final AbstractProject<?, ?> project,
public FormValidation doCheckId(@AncestorInPath final BuildableItem project,
@QueryParameter final String id) {
if (!new JenkinsFacade().hasPermission(Item.CONFIGURE, project)) {
return FormValidation.ok();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.kohsuke.stapler.verb.POST;
import hudson.Extension;
import hudson.model.AbstractDescribableImpl;
import hudson.model.AbstractProject;
import hudson.model.BuildableItem;
import hudson.model.Descriptor;
import hudson.model.Item;
import hudson.util.ComboBoxModel;
Expand Down Expand Up @@ -113,7 +113,7 @@ static void setJenkinsFacade(final JenkinsFacade facade) {
* @return a model with all static analysis tool IDs of all jobs
*/
@POST
public ComboBoxModel doFillIdItems(@AncestorInPath final AbstractProject<?, ?> project) {
public ComboBoxModel doFillIdItems(@AncestorInPath final BuildableItem project) {
ComboBoxModel model = new ComboBoxModel();
if (jenkinsFacade.hasPermission(Item.CONFIGURE, project)) {
model.addAll(collectAvailableIds());
Expand All @@ -139,7 +139,7 @@ private Set<String> collectAvailableIds() {
* @return the validation result
*/
@POST
public FormValidation doCheckId(@AncestorInPath final AbstractProject<?, ?> project,
public FormValidation doCheckId(@AncestorInPath final BuildableItem project,
@QueryParameter final String id) {
if (!new JenkinsFacade().hasPermission(Item.CONFIGURE, project)) {
return FormValidation.ok();
Expand Down
Loading

0 comments on commit 2b11a23

Please sign in to comment.