Skip to content

Commit

Permalink
docs: improve documentation and examples (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperupcall authored Jul 12, 2023
1 parent 9930d89 commit 830fb73
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ min_version: 1.1.3

You can manage the verbosity using the `skip_output` config. You can set whether lefthook should print some parts of its output.

Possible values are `meta,success,failure,summary,execution,execution_out,skips`.
Possible values are `meta,summary,success,failure,execution,execution_out,execution_info,skips`.

This config quiets all outputs except for errors.

Expand Down
38 changes: 19 additions & 19 deletions examples/verbose/lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ pre-commit:
glob: "*.{js,ts}"
run: npx eslint --fix {staged_files} && git add {staged_files}

# `ruby-test` will skip execution only when in a merging or rebasing state.
ruby-test:
skip:
- merge
- rebase
run: bundle exec rspec
fail_text: Run bundle install
# `ruby-test` will skip execution only when in a merging or rebasing state.
ruby-test:
skip:
- merge
- rebase
run: bundle exec rspec
fail_text: Run bundle install

# `ruby-lint` has `files` option which is a git command for replacing
# the {files} template. Then lefthook applies glob pattern to the result.
# If the final list is empty, the command will be skipped.
# Otherwise the {files} templace will be replaces with list.
#
# Note: if a template has surrounding quotes, they will be used to wrap
# each file in the list.
# Double quotes `"` and single quotes `'` are supported.
ruby-lint:
glob: "*.rb"
files: git diff-tree -r --name-only --diff-filter=CDMR HEAD origin/master
run: bundle exec rubocop --force-exclusion --parallel '{files}'
# `ruby-lint` has `files` option which is a git command for replacing
# the {files} template. Then lefthook applies glob pattern to the result.
# If the final list is empty, the command will be skipped.
# Otherwise the {files} templace will be replaces with list.
#
# Note: if a template has surrounding quotes, they will be used to wrap
# each file in the list.
# Double quotes `"` and single quotes `'` are supported.
ruby-lint:
glob: "*.rb"
files: git diff-tree -r --name-only --diff-filter=CDMR HEAD origin/master
run: bundle exec rubocop --force-exclusion --parallel '{files}'

# You can provide more hooks.
pre-push:
Expand Down

0 comments on commit 830fb73

Please sign in to comment.