mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
updated lint cmd descriptions
This commit is contained in:
parent
ee516e3958
commit
57a2c61386
3 changed files with 5 additions and 8 deletions
|
@ -313,7 +313,7 @@ def get_parser(default_config_files, git_root):
|
|||
group.add_argument(
|
||||
"--lint",
|
||||
action="store_true",
|
||||
help="Run the linter on all dirty files, fix problems and commit",
|
||||
help="Lint and fix provided files, or dirty files if none provided",
|
||||
default=False,
|
||||
)
|
||||
group.add_argument(
|
||||
|
|
|
@ -154,14 +154,14 @@ class Commands:
|
|||
self.coder.repo.commit(message=commit_message)
|
||||
|
||||
def cmd_lint(self, args="", fnames=None):
|
||||
"Commit, run the linter on all dirty files, fix problems and commit again"
|
||||
"Lint and fix provided files or in-chat files if none provided"
|
||||
|
||||
if not self.coder.repo:
|
||||
self.io.tool_error("No git repository found.")
|
||||
return
|
||||
|
||||
if not fnames:
|
||||
fnames = self.coder.repo.get_dirty_files()
|
||||
fnames = self.coder.get_inchat_relative_files()
|
||||
|
||||
if not fnames:
|
||||
self.io.tool_error("No dirty files to lint.")
|
||||
|
@ -170,7 +170,7 @@ class Commands:
|
|||
lint_coder = None
|
||||
for fname in fnames:
|
||||
try:
|
||||
errors = self.coder.linter.lint(fname, cmd=args)
|
||||
errors = self.coder.linter.lint(fname)
|
||||
except FileNotFoundError as err:
|
||||
self.io.tool_error(f"Unable to lint {fname}")
|
||||
self.io.tool_error(str(err))
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import traceback
|
||||
import warnings
|
||||
import re
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -205,9 +205,6 @@ def traverse_tree(node):
|
|||
return errors
|
||||
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def find_filenames_and_linenums(text, fnames):
|
||||
"""
|
||||
Search text for all occurrences of <filename>:\\d+ and make a list of them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue