From bc06d8623ce2b526034869e442ec6357d524c232 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 18 May 2024 19:30:32 -0700 Subject: [PATCH] Updated lint command to commit after fixing problems. --- aider/args.py | 4 ++-- aider/commands.py | 2 +- aider/main.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aider/args.py b/aider/args.py index 9ff40f61a..e7da13913 100644 --- a/aider/args.py +++ b/aider/args.py @@ -312,9 +312,9 @@ def get_parser(default_config_files, git_root): default=False, ) group.add_argument( - "--lint", + "--lint-and-commit", action="store_true", - help="Run the linter on all dirty files, fix problems and then commit.", + help="Commit, run the linter on all dirty files, fix problems and commit again", default=False, ) diff --git a/aider/commands.py b/aider/commands.py index 8e8ab25e8..09e22679a 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -154,7 +154,7 @@ class Commands: self.coder.repo.commit(message=commit_message) def cmd_lint(self, args): - "Run the linter on all dirty files, fix problems and then commit" + "Commit, run the linter on all dirty files, fix problems and commit again" if not self.coder.repo: self.io.tool_error("No git repository found.") diff --git a/aider/main.py b/aider/main.py index 34aca61ca..360749ddd 100644 --- a/aider/main.py +++ b/aider/main.py @@ -355,7 +355,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F coder.commands.cmd_commit("") return - if args.lint: + if args.lint_and_commit: coder.commands.cmd_lint("") return