mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 11:45:00 +00:00
Updated lint command to commit after fixing problems.
This commit is contained in:
parent
828a5264b0
commit
bc06d8623c
3 changed files with 4 additions and 4 deletions
|
@ -312,9 +312,9 @@ def get_parser(default_config_files, git_root):
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--lint",
|
"--lint-and-commit",
|
||||||
action="store_true",
|
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,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ class Commands:
|
||||||
self.coder.repo.commit(message=commit_message)
|
self.coder.repo.commit(message=commit_message)
|
||||||
|
|
||||||
def cmd_lint(self, args):
|
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:
|
if not self.coder.repo:
|
||||||
self.io.tool_error("No git repository found.")
|
self.io.tool_error("No git repository found.")
|
||||||
|
|
|
@ -355,7 +355,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
coder.commands.cmd_commit("")
|
coder.commands.cmd_commit("")
|
||||||
return
|
return
|
||||||
|
|
||||||
if args.lint:
|
if args.lint_and_commit:
|
||||||
coder.commands.cmd_lint("")
|
coder.commands.cmd_lint("")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue