diff --git a/src/iac_scan_runner/compatibility.py b/src/iac_scan_runner/compatibility.py index d82e8970e034be65e9230be3c509909b40e27083..8b52aecff2f0c09bfcd82cb181ad91007a1ae85e 100644 --- a/src/iac_scan_runner/compatibility.py +++ b/src/iac_scan_runner/compatibility.py @@ -81,6 +81,10 @@ class Compatibility: self.scanned_files["yaml"] = str(scanned_yaml) self.scanned_files["java"] = str(scanned_java) self.scanned_files["html"] = str(scanned_html) + + types = set(types) + print(types) + return types except Exception as e: raise Exception(f"Error when checking directory type: {str(e)}.") diff --git a/src/iac_scan_runner/results_summary.py b/src/iac_scan_runner/results_summary.py index 8256e613ba20bb6304222032c19e1fd29de584c5..56378cbfc823cf4dbfeee86b8a86cd8fd382606a 100644 --- a/src/iac_scan_runner/results_summary.py +++ b/src/iac_scan_runner/results_summary.py @@ -70,6 +70,30 @@ class ResultsSummary: self.outcomes[check]["status"] = "Problems" return "Problems" + if check == "htmlhint": + if outcome.find("no errors")>-1: + self.outcomes[check]["status"] = "Passed" + return "Passed" + else: + self.outcomes[check]["status"] = "Problems" + return "Problems" + + if check == "checkstyle": + if outcome == "": + self.outcomes[check]["status"] = "Passed" + return "Passed" + else: + self.outcomes[check]["status"] = "Problems" + return "Problems" + + if check == "es-lint": + if outcome == "": + self.outcomes[check]["status"] = "Passed" + return "Passed" + else: + self.outcomes[check]["status"] = "Problems" + return "Problems" + def summarize_no_files(self, check: str): """ Sets the outcome of the selected check to "no files" case