forked from mirrors/kingfisher
Added a new install-precommit subcommand that installs a git pre-commit hook, prompting or accepting --global/--repo flags to control scope and configuring the hook to run kingfisher --quiet --only-valid --no-update-check
This commit is contained in:
parent
2f1385f5f1
commit
7f3846c8e7
2 changed files with 3 additions and 3 deletions
|
|
@ -96,7 +96,7 @@ make all # builds for every OS and architecture supported
|
|||
### Install as a Git pre-commit hook
|
||||
|
||||
Run `kingfisher precommit --install` to set up a Git pre-commit hook that runs
|
||||
`kingfisher --quiet --only-valid --no-update-check` before each commit.
|
||||
`kingfisher scan --quiet --only-valid --no-update-check` before each commit.
|
||||
Use `--global` to operate on all repositories or `--repo` to target only the
|
||||
current repository without prompting. Remove the hook with
|
||||
`kingfisher precommit --remove`.
|
||||
|
|
|
|||
|
|
@ -214,9 +214,9 @@ fn hook_content() -> String {
|
|||
|
||||
fn hook_call_line() -> String {
|
||||
if cfg!(windows) {
|
||||
"kingfisher --quiet --only-valid --no-update-check %*".to_string()
|
||||
"kingfisher scan --quiet --only-valid --no-update-check %*".to_string()
|
||||
} else {
|
||||
"kingfisher --quiet --only-valid --no-update-check \"$@\"".to_string()
|
||||
"kingfisher scan --quiet --only-valid --no-update-check \"$@\"".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue