Moving required check.
@@ -98,14 +98,7 @@ public class ShutdownManager {
detectorTypes.addAll(runResultOptional.get().getApplicableDetectors());
}
- boolean printOutput = detectConfiguration.getBooleanProperty(DetectProperty.DETECT_SUPPRESS_RESULTS_OUTPUT, PropertyAuthority.None);
-
- ExitCodeType detectExitCode = exitCodeManager.getWinningExitCode();
- if (!printOutput) {
- reportManager.printDetectorIssues();
- detectStatusManager.logDetectResults(new Slf4jIntLogger(logger), detectExitCode);
- }
-
+ //Check required
String requiredDetectors = detectConfiguration.getProperty(DetectProperty.DETECT_REQUIRED_DETECTOR_TYPES, PropertyAuthority.None);
RequiredDetectorChecker requiredDetectorChecker = new RequiredDetectorChecker();
RequiredDetectorChecker.RequiredDetectorResult requiredDetectorResult = requiredDetectorChecker.checkForMissingDetectors(requiredDetectors, detectorTypes);
@@ -115,6 +108,13 @@ public class ShutdownManager {
exitCodeManager.requestExitCode(ExitCodeType.FAILURE_DETECTOR_REQUIRED);
}
+ //Print status
+ boolean printOutput = detectConfiguration.getBooleanProperty(DetectProperty.DETECT_SUPPRESS_RESULTS_OUTPUT, PropertyAuthority.None);
+ ExitCodeType detectExitCode = exitCodeManager.getWinningExitCode();
+ if (!printOutput) {
+ reportManager.printDetectorIssues();
+ detectStatusManager.logDetectResults(new Slf4jIntLogger(logger), detectExitCode);
+ }
return detectExitCode;
}
