mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Return the linting results in the Linter class.
This commit is contained in:
parent
2e6c7a13b2
commit
5959e7990a
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,7 @@ class Linter:
|
|||
def run_cmd(self, cmd, rel_fname):
|
||||
cmd += " " + rel_fname
|
||||
cmd = cmd.split()
|
||||
|
||||
try:
|
||||
subprocess.check_output(cmd, cwd=self.root).decode()
|
||||
return # zero exit status
|
||||
|
@ -51,6 +52,8 @@ class Linter:
|
|||
res += "But if the command fixed all the issues itself, don't take further action.\n\n"
|
||||
res += errors
|
||||
|
||||
return res
|
||||
|
||||
def lint(self, fname):
|
||||
lang = filename_to_lang(fname)
|
||||
if not lang:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue