mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-20 00:04:27 +01:00
formating and codacy recommended updates
This commit is contained in:
@@ -52,6 +52,13 @@ import org.owasp.dependencycheck.utils.Settings;
|
||||
)
|
||||
public class AggregateMojo extends BaseDependencyCheckMojo {
|
||||
|
||||
/**
|
||||
* The name of the report in the site.
|
||||
*/
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
@Parameter(property = "name", defaultValue = "dependency-check:aggregate", required = true)
|
||||
private String name = "dependency-check:aggregate";
|
||||
|
||||
/**
|
||||
* Executes the aggregate dependency-check goal. This runs dependency-check
|
||||
* and generates the subsequent reports.
|
||||
@@ -255,13 +262,6 @@ public class AggregateMojo extends BaseDependencyCheckMojo {
|
||||
return true; //aggregate always returns true for now - we can look at a more complicated/acurate solution later
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the report in the site.
|
||||
*/
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
@Parameter(property = "name", defaultValue = "dependency-check:aggregate", required = true)
|
||||
private String name = "dependency-check:aggregate";
|
||||
|
||||
/**
|
||||
* Returns the report name.
|
||||
*
|
||||
|
||||
@@ -80,6 +80,10 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
* System specific new line character.
|
||||
*/
|
||||
private static final String NEW_LINE = System.getProperty("line.separator", "\n").intern();
|
||||
/**
|
||||
* A flag indicating whether or not the Maven site is being generated.
|
||||
*/
|
||||
private boolean generatingSite = false;
|
||||
//</editor-fold>
|
||||
// <editor-fold defaultstate="collapsed" desc="Maven bound parameters and components">
|
||||
/**
|
||||
@@ -93,15 +97,6 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
@Parameter(property = "failOnError", defaultValue = "true", required = true)
|
||||
private boolean failOnError;
|
||||
|
||||
/**
|
||||
* Returns if the mojo should fail the build if an exception occurs.
|
||||
*
|
||||
* @return whether or not the mojo should fail the build
|
||||
*/
|
||||
protected boolean isFailOnError() {
|
||||
return failOnError;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Maven Project Object.
|
||||
*/
|
||||
@@ -343,14 +338,6 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
@Parameter(property = "connectionString", defaultValue = "", required = false)
|
||||
private String connectionString;
|
||||
|
||||
/**
|
||||
* Returns the connection string.
|
||||
*
|
||||
* @return the connection string
|
||||
*/
|
||||
protected String getConnectionString() {
|
||||
return connectionString;
|
||||
}
|
||||
/**
|
||||
* The database driver name. An example would be org.h2.Driver.
|
||||
*/
|
||||
@@ -473,9 +460,9 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
@Parameter(property = "externalReport")
|
||||
@Deprecated
|
||||
private String externalReport = null;
|
||||
|
||||
// </editor-fold>
|
||||
//<editor-fold defaultstate="collapsed" desc="Base Maven implementation">
|
||||
|
||||
/**
|
||||
* Executes dependency-check.
|
||||
*
|
||||
@@ -526,11 +513,6 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
generate((Sink) sink, locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* A flag indicating whether or not the maven site is being generated.
|
||||
*/
|
||||
private boolean generatingSite = false;
|
||||
|
||||
/**
|
||||
* Returns true if the Maven site is being generated.
|
||||
*
|
||||
@@ -540,6 +522,23 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
return generatingSite;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the connection string.
|
||||
*
|
||||
* @return the connection string
|
||||
*/
|
||||
protected String getConnectionString() {
|
||||
return connectionString;
|
||||
}
|
||||
/**
|
||||
* Returns if the mojo should fail the build if an exception occurs.
|
||||
*
|
||||
* @return whether or not the mojo should fail the build
|
||||
*/
|
||||
protected boolean isFailOnError() {
|
||||
return failOnError;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the Dependency-Check Site Report.
|
||||
*
|
||||
|
||||
@@ -46,6 +46,13 @@ import org.owasp.dependencycheck.utils.Settings;
|
||||
)
|
||||
public class CheckMojo extends BaseDependencyCheckMojo {
|
||||
|
||||
/**
|
||||
* The name of the report in the site.
|
||||
*/
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
@Parameter(property = "name", defaultValue = "dependency-check", required = true)
|
||||
private String name = "dependency-check";
|
||||
|
||||
/**
|
||||
* Returns whether or not a the report can be generated.
|
||||
*
|
||||
@@ -126,13 +133,6 @@ public class CheckMojo extends BaseDependencyCheckMojo {
|
||||
Settings.cleanup();
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the report in the site.
|
||||
*/
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
@Parameter(property = "name", defaultValue = "dependency-check", required = true)
|
||||
private String name = "dependency-check";
|
||||
|
||||
/**
|
||||
* Returns the report name.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user