mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
Set linter command as a string and update the result message format.
This commit is contained in:
parent
f43b352949
commit
901d8a1a2a
1 changed files with 3 additions and 6 deletions
|
@ -24,7 +24,7 @@ class Linter:
|
|||
|
||||
self.languages = dict(
|
||||
# python=self.py_lint,
|
||||
python="pre-commit run --files"
|
||||
python="/Users/gauthier/Projects/aider/tmp.sh"
|
||||
)
|
||||
|
||||
def set_linter(self, lang, cmd):
|
||||
|
@ -46,11 +46,8 @@ class Linter:
|
|||
except subprocess.CalledProcessError as err:
|
||||
errors = err.output.decode() # non-zero exit status
|
||||
|
||||
res = f"# Running: {cmd}\n"
|
||||
res += "If the output below indicates errors or problems, fix them.\n"
|
||||
res += (
|
||||
"But if the command says it fixed all the issues itself, don't take further action.\n\n"
|
||||
)
|
||||
cmd = " ".join(cmd)
|
||||
res = f"# Running: {cmd}\n\n"
|
||||
res += errors
|
||||
|
||||
return res
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue