MCPcopy Create free account
hub / github.com/dependency-check/DependencyCheck / App

Class App

cli/src/main/java/org/owasp/dependencycheck/App.java:59–856  ·  view source on GitHub ↗

The command line interface for the DependencyCheck application. @author Jeremy Long

Source from the content-addressed store, hash-verified

57 * @author Jeremy Long
58 */
59@SuppressWarnings("squid:S106")
60public class App {
61
62 /**
63 * The logger.
64 */
65 private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
66 /**
67 * Properties file error message.
68 */
69 private static final String ERROR_LOADING_PROPERTIES_FILE = "Error loading properties file";
70 /**
71 * System specific new line character.
72 */
73 private static final String NEW_LINE = System.getProperty("line.separator", "\n");
74 /**
75 * The configured settings.
76 */
77 private final Settings settings;
78
79 /**
80 * The main method for the application.
81 *
82 * @param args the command line arguments
83 */
84 @SuppressWarnings("squid:S4823")
85 public static void main(String[] args) {
86 final int exitCode;
87 final App app = new App();
88 exitCode = app.run(args);
89 LOGGER.debug("Exit code: {}", exitCode);
90 System.exit(exitCode);
91 }
92
93 /**
94 * Builds the App object.
95 */
96 public App() {
97 settings = new Settings();
98 }
99
100 /**
101 * Builds the App object; this method is used for testing.
102 *
103 * @param settings the configured settings
104 */
105 protected App(Settings settings) {
106 this.settings = settings;
107 }
108
109 /**
110 * Main CLI entry-point into the application.
111 *
112 * @param args the command line arguments
113 * @return the exit code to return
114 */
115 public int run(String[] args) {
116 int exitCode = 0;

Callers

nothing calls this directly

Calls 2

getLoggerMethod · 0.80
getPropertyMethod · 0.80

Tested by

no test coverage detected