refactor: improve formatting of lint commands in platform info

This commit is contained in:
Paul Gauthier (aider) 2024-08-30 18:24:52 -07:00
parent ec9a6f9d66
commit 87593a2e37

View file

@ -885,8 +885,13 @@ class Coder:
platform_text += "- The user is operating inside a git repository\n" platform_text += "- The user is operating inside a git repository\n"
if self.lint_cmds: if self.lint_cmds:
platform_text += f"- Lint commands: {self.lint_cmds}\n" platform_text += "- Lint commands:\n"
for lang, cmd in self.lint_cmds.items():
if lang is None:
platform_text += f" - Default: {cmd}\n"
else:
platform_text += f" - {lang}: {cmd}\n"
if self.test_cmd: if self.test_cmd:
platform_text += f"- Test command: {self.test_cmd}\n" platform_text += f"- Test command: {self.test_cmd}\n"