Update readme with instruction for developing.

Change DiagnosticGenerator -> Linter since this is much easier to understand.
This commit is contained in:
Joey de l'Arago 2022-11-23 17:52:33 +01:00
parent 8e027c4af9
commit e83ed933e2
10 changed files with 39 additions and 19 deletions

View file

@ -65,13 +65,12 @@ def main() -> None:
def diagnoseIssuesWithFile(file: Path, settings: dict) -> List[Diagnostic]:
""" For file, runs all diagnostic checks in settings and returns a list of diagnostics """
# Find correct diagnostic generator for file
diagnostic_generator = factory.create(file, settings)
linter = factory.getLinter(file, settings)
if not diagnostic_generator:
if not linter:
return []
return list(filter(lambda d: d is not None, diagnostic_generator.check()))
return list(filter(lambda d: d is not None, linter.check()))
def applyFixesToFile(file, settings, full_body_check) -> None: