From 7737cf13be87654881df1cc00353d0a3fced014a Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 27 Aug 2024 07:33:45 +0200 Subject: [PATCH] ruff: do full scans With Ruff being so fast it doesn't seem to make sense to only scan a limited set of (changed) files. Let's give the linter a full code context. --- vcs-diff-lint | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vcs-diff-lint b/vcs-diff-lint index 79c6487..2cdb9eb 100755 --- a/vcs-diff-lint +++ b/vcs-diff-lint @@ -185,8 +185,10 @@ class RuffLinter(_Linter): def is_compatible(self, file): return file.type == 'python' - def command(self, projectdir, filenames): - cmd = [CSDIFF_RUFF] + filenames + def command(self, projectdir, _filenames): + # While we optimize other analyzers and we scan only the changed + # set of files, Ruff is fast enough to do full-projectdir scan. + cmd = [CSDIFF_RUFF] + [os.path.join(self.gitroot, projectdir)] return cmd, {}