Skip to content

Commit

Permalink
ruff: do full scans
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
praiskup committed Aug 27, 2024
1 parent 1d5dcff commit 38412fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vcs-diff-lint
Original file line number Diff line number Diff line change
Expand Up @@ -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, {}


Expand Down

0 comments on commit 38412fb

Please sign in to comment.