Skip to content

Commit abdd8b6

Browse files
nyurikLucas-C
andauthored
Document each hook (#104)
* Document each hook I was not sure what each hook does, so proposing this PR to avoid ambiguity * link to hook definitions * mdformat --------- Co-authored-by: Lucas Cimon <925560+Lucas-C@users.noreply.github.com>
1 parent fd3fbe8 commit abdd8b6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,25 @@ into separate repos:
4646

4747
## Usage
4848

49+
See [hook definitions](./.pre-commit-hooks.yaml) for additional hook
50+
documentation.
51+
52+
All hooks work on text files, except for the `chmod` hook that applies to
53+
all files.
54+
4955
```yaml
5056
- repo: https://github.com/Lucas-C/pre-commit-hooks
5157
rev: v1.5.5
5258
hooks:
53-
- id: forbid-crlf
54-
- id: remove-crlf
55-
- id: forbid-tabs
56-
- id: remove-tabs
59+
- id: forbid-crlf # Forbid files containing CRLF end-lines to be committed
60+
- id: remove-crlf # Replace CRLF end-lines by LF ones before committing
61+
- id: forbid-tabs # Forbid files containing tabs to be committed
62+
- id: remove-tabs # Replace tabs by whitespaces before committing
5763
args: [--whitespaces-count, '2'] # defaults to: 4
58-
- id: chmod
64+
- id: chmod # Set file permissions
5965
args: ['644']
6066
files: \.md$
61-
- id: insert-license
67+
- id: insert-license # Insert a short license disclaimer as a header comment in source files
6268
files: \.groovy$
6369
args:
6470
- --license-filepath

0 commit comments

Comments
 (0)