From 06bda2d730835a13b191f87fc8d4b27083f93728 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 18 May 2024 20:52:21 -0700 Subject: [PATCH] aider: Added a `--lint-cmd` argument to allow users to specify a lint command multiple times. # Aider chat conversation: USER: add a --lint-cmd arg that takes a string like "python python-linter --with --args". allow the user to specify this args multiple times ASSISTANT: To add a `--lint-cmd` argument that takes a string and allows the user to specify this argument multiple times, we need to: 1. Add the new argument to the parser. 2. Ensure it can be specified multiple times. Here is the *SEARCH/REPLACE* block for `aider/args.py`: aider/args.py ```python <<<<<<< SEARCH ) ======= ) ########## group = parser.add_argument_group("Lint Settings") group.add_argument( "--lint-cmd", action="append", metavar="LINT_CMD", help="Specify a lint command to run. Can be specified multiple times.", ) >>>>>>> REPLACE ``` --- aider/args.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aider/args.py b/aider/args.py index e7da13913..1d7d3fc51 100644 --- a/aider/args.py +++ b/aider/args.py @@ -14,6 +14,15 @@ def get_parser(default_config_files, git_root): config_file_parser_class=configargparse.YAMLConfigFileParser, auto_env_var_prefix="AIDER_", ) + + ########## + group = parser.add_argument_group("Lint Settings") + group.add_argument( + "--lint-cmd", + action="append", + metavar="LINT_CMD", + help="Specify a lint command to run. Can be specified multiple times.", + ) ########## group = parser.add_argument_group("Main")