-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nathan Chancellor <[email protected]>
- Loading branch information
1 parent
e52adb5
commit 080e382
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env fish | ||
# SPDX-License-Identifier: MIT | ||
# Copyright (C) 2024 Nathan Chancellor | ||
|
||
function git_py_files -d "Get Python files checked into current repository for linting" | ||
# Get list of files, specifically excluding this one, as it is a false | ||
# positive due to the command used :) We pass through realpath and uniq | ||
# to handle files that may be symlinked multiple times like korg_tc, | ||
# which can make linting annoying otherwise | ||
set files (git ls-files | grep -Fv (status function).fish | xargs realpath | uniq | string replace "$PWD/" '') | ||
|
||
# Sort after ripgrep because sorting within ripgrep reduces parallelism | ||
rg -l '#!/usr/bin/env python' $files | sort | ||
end |