refactor: Update report filtering logic to match specific scanner naming patterns

This commit is contained in:
Bobby (aider) 2025-02-12 20:02:00 -08:00
parent c1382ba694
commit f4f7505e5c

View File

@ -23,9 +23,12 @@ def load_scanner_reports(scanner_type: str = None):
# Get file creation time
created = datetime.fromtimestamp(file.stat().st_ctime)
# If scanner_type is specified, only include matching reports
if scanner_type:
if not file.name.lower().startswith(scanner_type.lower()):
# If scanner_type is specified, filter based on actual naming patterns
if scanner_type == "technical":
if not (file.name.startswith(("atr_ema_", "sunny_"))):
continue
elif scanner_type == "canslim":
if not file.name.startswith("canslim_"):
continue
reports.append({