fix: more zero matches fixes

This commit is contained in:
2023-02-13 09:22:30 +01:00
parent 683112dd1c
commit df4dc540c6
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ def scanFile(args, scanner):
# convert IntervalTree Matches
logging.info("Found {} matches".format(len(matchesIt)))
if len(matchesIt) == 0:
logging.warn("No matches found. Try some other options?")
logging.warning("No matches found. Try some other options?")
matches = convertMatchesIt(matchesIt)
verification = None
+6
View File
@@ -35,6 +35,9 @@ def verify(file, matches: List[Match], scanner) -> Verification:
def verificationAnalyzer(verifications: List[VerificationEntry]) -> MatchConclusion:
"""Do some analysis on the verifications, and return the result"""
verifyResults = []
if len(verifications) == 0:
matchConclusions = MatchConclusion(verifyResults)
return matchConclusions
matchCount = len(verifications[0].matchTests)
@@ -111,6 +114,9 @@ def runVerifications(file, matches: List[Match], scanner) -> List[VerificationEn
verificationRun.matchTests.append(toTestEntry('', result))
verificationRuns.append(verificationRun)
if len(matches) == 1:
return verificationRuns
# Incremental, Middle
verificationRun = VerificationEntry(
index=2,