Skip to content

Add an option to skip the time-consuming post-processing step.

ci.jenkins.io / CPD succeeded Jan 8, 2024 in 0s

5 new issues, 302 total

Total New Outstanding Fixed Trend
302 5 297 6 👍

Reference build: Plugins » warnings-ng-plugin » main #25

Details

Severity distribution of new issues

Error Warning High Warning Normal Warning Low
0 1 1 3

Annotations

Check warning on line 221 in plugin/src/main/java/io/jenkins/plugins/analysis/core/steps/ScanForIssuesStep.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / CPD

CPD

HIGH:
Found duplicated code.
Raw output
<pre><code>} &#64;CheckForNull public String getSourceCodeEncoding() { return sourceCodeEncoding; } /** * Sets the encoding to use to read source files. * * &#64;param sourceCodeEncoding * the encoding, e.g. &#34;ISO-8859-1&#34; */ &#64;DataBoundSetter public void setSourceCodeEncoding(final String sourceCodeEncoding) { this.sourceCodeEncoding &#61; sourceCodeEncoding; } public String getSourceDirectory() { return sourceDirectory; } /** * Sets the path to the folder that contains the source code. If not relative and thus not part of the workspace * then this folder needs to be added in Jenkins global configuration. * * &#64;param sourceDirectory * a folder containing the source code */ &#64;DataBoundSetter public void setSourceDirectory(final String sourceDirectory) { this.sourceDirectory &#61; sourceDirectory; } /** * Sets the paths to the directories that contain the source code. If not relative and thus not part of the * workspace then these directories need to be added in Jenkins global configuration to prevent accessing of * forbidden resources. * * &#64;param sourceDirectories * directories containing the source code */ &#64;DataBoundSetter public void setSourceDirectories(final List&lt;SourceCodeDirectory&gt; sourceDirectories) { this.sourceDirectories &#61; new HashSet&lt;&gt;(sourceDirectories); } public List&lt;SourceCodeDirectory&gt; getSourceDirectories() { return new ArrayList&lt;&gt;(sourceDirectories); } private List&lt;SourceCodeDirectory&gt; getAllSourceDirectories() {<!-- --></code></pre>

Check warning on line 218 in plugin/src/main/java/io/jenkins/plugins/analysis/core/steps/ScanForIssuesStep.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / CPD

CPD

NORMAL:
Found duplicated code.
Raw output
<pre><code>} &#64;CheckForNull public String getSourceCodeEncoding() { return sourceCodeEncoding; } /** * Sets the encoding to use to read source files. * * &#64;param sourceCodeEncoding * the encoding, e.g. &#34;ISO-8859-1&#34; */ &#64;DataBoundSetter public void setSourceCodeEncoding(final String sourceCodeEncoding) { this.sourceCodeEncoding &#61; sourceCodeEncoding; } public String getSourceDirectory() { return sourceDirectory; } /** * Sets the path to the directory that contains the source code. If not relative and thus not part of the workspace * then this directory needs to be added in Jenkins global configuration to prevent accessing of forbidden resources. * * &#64;param sourceDirectory * directory containing the source code */ &#64;DataBoundSetter public void setSourceDirectory(final String sourceDirectory) { this.sourceDirectory &#61; sourceDirectory; } /** * Sets the paths to the directories that contain the source code. If not relative and thus not part of the workspace * then these directories need to be added in Jenkins global configuration to prevent accessing of forbidden resources. * * &#64;param sourceDirectories * directories containing the source code */ &#64;DataBoundSetter public void setSourceDirectories(final List&lt;SourceCodeDirectory&gt; sourceDirectories) { this.sourceDirectories &#61; new HashSet&lt;&gt;(sourceDirectories); } public List&lt;SourceCodeDirectory&gt; getSourceDirectories() { return new ArrayList&lt;&gt;(sourceDirectories); }</code></pre>

Check warning on line 119 in plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/ModuleDetectorITest.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / CPD

CPD

LOW:
Found duplicated code.
Raw output
<pre><code>void shouldShowModulesForVariousModulesDetectedForOsgiMavenAndAntInTheHtmlOutput() { String[] workspaceFiles &#61; { BUILD_FILE_PATH &#43; ANT_BUILD_FILE_LOCATION &#43; &#34;build.xml&#34;, BUILD_FILE_PATH &#43; ANT_BUILD_FILE_LOCATION &#43; &#34;m1/build.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;pom.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;m1/pom.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;m2/pom.xml&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m1/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m2/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m3/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;plugin.properties&#34;};</code></pre>

Check warning on line 145 in plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/ModuleDetectorITest.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / CPD

CPD

LOW:
Found duplicated code.
Raw output
<pre><code>void shouldShowModulesForVariousModulesDetectedForOsgiMavenAndAntInTheHtmlOutput() { String[] workspaceFiles &#61; { BUILD_FILE_PATH &#43; ANT_BUILD_FILE_LOCATION &#43; &#34;build.xml&#34;, BUILD_FILE_PATH &#43; ANT_BUILD_FILE_LOCATION &#43; &#34;m1/build.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;pom.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;m1/pom.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;m2/pom.xml&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m1/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m2/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m3/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;plugin.properties&#34;};</code></pre>

Check warning on line 240 in plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/ModuleDetectorITest.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / CPD

CPD

LOW:
Found duplicated code.
Raw output
<pre><code>void shouldShowModulesForVariousModulesDetectedForOsgiMavenAndAntInTheHtmlOutput() { String[] workspaceFiles &#61; { BUILD_FILE_PATH &#43; ANT_BUILD_FILE_LOCATION &#43; &#34;build.xml&#34;, BUILD_FILE_PATH &#43; ANT_BUILD_FILE_LOCATION &#43; &#34;m1/build.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;pom.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;m1/pom.xml&#34;, BUILD_FILE_PATH &#43; MAVEN_BUILD_FILE_LOCATION &#43; &#34;m2/pom.xml&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m1/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m2/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;m3/META-INF/MANIFEST.MF&#34;, BUILD_FILE_PATH &#43; OSGI_BUILD_FILE_LOCATION &#43; &#34;plugin.properties&#34;};</code></pre>