mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 13:15:00 +00:00
feat: add error handling for parser loading in basic_lint function
This commit is contained in:
parent
abf6a9db2e
commit
1a6284cb24
1 changed files with 6 additions and 1 deletions
|
@ -209,7 +209,12 @@ def basic_lint(fname, code):
|
|||
if lang == "typescript":
|
||||
return
|
||||
|
||||
parser = get_parser(lang)
|
||||
try:
|
||||
parser = get_parser(lang)
|
||||
except OSError as err:
|
||||
print(f"Unable to load parser: {err}")
|
||||
return
|
||||
|
||||
tree = parser.parse(bytes(code, "utf-8"))
|
||||
|
||||
errors = traverse_tree(tree.root_node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue