Skip to content

Commit

Permalink
'Solution'
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoQwest committed Oct 10, 2024
1 parent 07a313b commit 5b64201
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@


def format_linter_error(error: dict) -> dict:


return {
"line": error["line_number"],
"column": error["column_number"],
Expand All @@ -12,13 +14,17 @@ def format_linter_error(error: dict) -> dict:
}

def format_single_linter_file(file_path: str, errors: list) -> dict:


return {
errors: [format_linter_error(error) for error in errors],
"path": file_path,
"status": "failed" if errors else "passed"
}

def format_linter_report(linter_report: dict) -> list:


return [
format_single_linter_file(file_path, errors)
for file_path, errors in linter_report.items()
Expand Down

0 comments on commit 5b64201

Please sign in to comment.