def METHOD_NAME(file: Path, settings: dict) -> List[Diagnostic]:
    """ For file, runs all diagnostic checks in settings and returns a list of diagnostics """
    linter = factory.getLinter(file, settings)
    if not linter:
        return []
    return list(filter(lambda d: d is not None, linter.check()))