Skip to content

Tms 078 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 204 commits into
base: master
Choose a base branch
from
Open

Tms 078 #51

wants to merge 204 commits into from

Conversation

TimSVector
Copy link
Collaborator

@TimSVector TimSVector commented Jun 12, 2024

  • Adding in following capabilities
    • Extended Cobertura format output for use with Jenkins Coverage Plugin
    • Unit Test Data format output in SonarQube format
    • Adding capability to generate an index.html for all .html reports
  • Refactored New Job code to reduce duplication
  • Moved to Jenkins 2.440 and Java 11
  • Added BETA support for RGW3
  • Removed VectorCAST Project Environment report
  • Fixed remote copy of VCAST_VC_SCRIPTS

Testing done

Standard plugin testing

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@TimSVector TimSVector self-assigned this Jun 12, 2024
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

FilePath dest = new FilePath(
destScriptDir, fileOrDir);

if (dest != null) {

Check warning

Code scanning / CodeQL

Useless null check Warning

This check is useless.
dest
cannot be null at this check, since
new FilePath(...)
always is non-null.

Copilot Autofix

AI 20 days ago

To fix the problem, we need to remove the redundant null check on the dest variable. This involves deleting the if (dest != null) condition and its corresponding closing brace. The rest of the code inside the block should remain unchanged to preserve the existing functionality.

Suggested changeset 1
src/main/java/com/vectorcast/plugins/vectorcastexecution/VectorCASTSetup.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/main/java/com/vectorcast/plugins/vectorcastexecution/VectorCASTSetup.java b/src/main/java/com/vectorcast/plugins/vectorcastexecution/VectorCASTSetup.java
--- a/src/main/java/com/vectorcast/plugins/vectorcastexecution/VectorCASTSetup.java
+++ b/src/main/java/com/vectorcast/plugins/vectorcastexecution/VectorCASTSetup.java
@@ -219,21 +219,19 @@
                             destScriptDir, fileOrDir);
-
-                        if (dest != null) {
-                            if (entry.isDirectory()) {
-                                dest.mkdirs();
-                            } else {
-                                FilePath parentDir = dest.getParent();
-                                if (parentDir != null) {
-                                    parentDir.mkdirs();
-                                    try (InputStream is = VectorCASTSetup.class.
-                                        getResourceAsStream("/" + entryName)) {
-                                        dest.copyFrom(is);
-                                    } catch (IOException ex) {
-                                        Logger.getLogger(VectorCASTSetup.class
-                                            .getName())
-                                            .log(Level.INFO, null, ex);
-                                    }
-                                }
-                            }
-                        }
+
+                        if (entry.isDirectory()) {
+                            dest.mkdirs();
+                        } else {
+                            FilePath parentDir = dest.getParent();
+                            if (parentDir != null) {
+                                parentDir.mkdirs();
+                                try (InputStream is = VectorCASTSetup.class.
+                                    getResourceAsStream("/" + entryName)) {
+                                    dest.copyFrom(is);
+                                } catch (IOException ex) {
+                                    Logger.getLogger(VectorCASTSetup.class
+                                        .getName())
+                                        .log(Level.INFO, null, ex);
+                                }
+                            }
+                        }
                     }
EOF
@@ -219,21 +219,19 @@
destScriptDir, fileOrDir);

if (dest != null) {
if (entry.isDirectory()) {
dest.mkdirs();
} else {
FilePath parentDir = dest.getParent();
if (parentDir != null) {
parentDir.mkdirs();
try (InputStream is = VectorCASTSetup.class.
getResourceAsStream("/" + entryName)) {
dest.copyFrom(is);
} catch (IOException ex) {
Logger.getLogger(VectorCASTSetup.class
.getName())
.log(Level.INFO, null, ex);
}
}
}
}

if (entry.isDirectory()) {
dest.mkdirs();
} else {
FilePath parentDir = dest.getParent();
if (parentDir != null) {
parentDir.mkdirs();
try (InputStream is = VectorCASTSetup.class.
getResourceAsStream("/" + entryName)) {
dest.copyFrom(is);
} catch (IOException ex) {
Logger.getLogger(VectorCASTSetup.class
.getName())
.log(Level.INFO, null, ex);
}
}
}
}
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants