Prompt user to fix lint errors before committing changes

This commit is contained in:
Paul Gauthier 2024-07-29 16:42:20 -03:00 committed by Paul Gauthier (aider)
parent f62e5bd883
commit 05ee45c31f
2 changed files with 13 additions and 15 deletions

View file

@ -251,12 +251,14 @@ class Commands:
if not errors:
continue
self.io.tool_error(errors)
if not self.io.confirm_ask(f"Fix lint errors in {fname}?", default="y"):
continue
# Commit everything before we start fixing lint errors
if self.coder.repo.is_dirty():
self.cmd_commit("")
self.io.tool_error(errors)
if not lint_coder:
lint_coder = self.coder.clone(
# Clear the chat history, fnames