Skip to content

Commit

Permalink
fish: kchp: Add flexibility to location of checkpatch.pl
Browse files Browse the repository at this point in the history
It is sometimes helpful to run mainline's checkpatch.pl on stable
patches.

Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance committed Nov 29, 2023
1 parent c9575e0 commit e3be7a3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions fish/functions/kchp.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
# Copyright (C) 2021-2023 Nathan Chancellor

function kchp -d "Shorthand for scripts/checkpatch.pl"
if not test -x scripts/checkpatch.pl
print_error "checkpatch.pl does not exist"
if test -n "$CHECKPATCH"
set checkpatch $CHECKPATCH
else
set checkpatch scripts/checkpatch.pl
end

if not test -x $checkpatch
print_error "$checkpatch does not exist or is not executable?"
return 1
end
scripts/checkpatch.pl $argv

$checkpatch $argv
end

0 comments on commit e3be7a3

Please sign in to comment.