-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow list of files in exclude option (#772)
* feat: allow list of files in exclude option * chore: add integrity test * docs: update docs
- Loading branch information
Showing
4 changed files
with
97 additions
and
12 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
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
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
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,42 @@ | ||
exec git init | ||
exec lefthook install | ||
exec git config user.email "[email protected]" | ||
exec git config user.name "Your Name" | ||
exec git add -A | ||
exec lefthook run -f all | ||
stdout 'excluded.txt lefthook.yml not-excluded.txt' | ||
exec lefthook run -f regexp | ||
stdout 'lefthook.yml not-excluded.txt' | ||
exec lefthook run -f array | ||
stdout 'lefthook.yml not-excluded.txt' | ||
|
||
-- lefthook.yml -- | ||
skip_output: | ||
- skips | ||
- meta | ||
- summary | ||
- execution_info | ||
all: | ||
commands: | ||
echo: | ||
run: echo {staged_files} | ||
|
||
regexp: | ||
commands: | ||
echo: | ||
run: echo {staged_files} | ||
exclude: '^excluded.txt' | ||
|
||
array: | ||
commands: | ||
echo: | ||
run: echo {staged_files} | ||
exclude: | ||
- exclude.txt | ||
|
||
-- not-excluded.txt -- | ||
sometext | ||
|
||
-- excluded.txt -- | ||
somecode | ||
|