Return the linting results in the Linter class.

This commit is contained in:
Paul Gauthier 2024-05-18 18:59:37 -07:00
parent 2e6c7a13b2
commit 5959e7990a

View file

@ -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: