Add dirty tracked files to the list of files to lint

This commit is contained in:
Paul Gauthier 2024-07-30 15:09:03 -03:00 committed by Paul Gauthier (aider)
parent 4a3ea08b49
commit 5f9275a3c2

View file

@ -227,14 +227,19 @@ class Commands:
if not fnames:
fnames = self.coder.get_inchat_relative_files()
dump(fnames)
# If still no files, get all dirty files in the repo
tracked_files = self.coder.repo.get_tracked_files()
if not fnames and self.coder.repo:
fnames = [
self.coder.get_rel_fname(f)
for f in self.coder.repo.get_tracked_files()
if self.coder.repo.is_dirty(f)
[
fn
for fn in tracked_files
if self.coder.repo.is_dirty(fn)
]
dump(fnames)
if not fnames:
self.io.tool_error("No dirty files to lint.")
return