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
```
This commit is contained in:
Paul Gauthier 2024-05-18 20:52:21 -07:00
parent 6fac50a3a1
commit 06bda2d730

View file

@ -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")