Skip to content

Commit c70965c

Browse files
committed
explaining the pre-commit hooks
1 parent d1b59cc commit c70965c

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@ repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
77
rev: v5.0.0
88
hooks:
9-
- id: trailing-whitespace
10-
- id: end-of-file-fixer
11-
- id: check-yaml
12-
- id: check-json
13-
- id: check-added-large-files
9+
- id: trailing-whitespace # remove trailing whitespace
10+
- id: end-of-file-fixer # ensure files end with a newline
11+
- id: check-yaml # check YAML files for syntax errors
12+
- id: check-json # check JSON files for syntax errors
13+
- id: check-added-large-files # check for large files
1414
args: ['--maxkb=500'] # set the max file size to 500KB
15-
- id: check-case-conflict
16-
- id: check-merge-conflict
17-
- id: check-symlinks
15+
- id: check-case-conflict # check for case conflicts in filenames.
16+
- id: check-merge-conflict # This hook checks for merge conflict markers in files.
17+
# It ensures that there are no unresolved merge conflicts in the codebase.
18+
- id: check-symlinks # check for broken symlinks
1819
# - id: debug-statements
19-
- id: mixed-line-ending
20+
- id: mixed-line-ending # check for mixed line endings, meaning that
21+
# a file contains both CRLF and LF line endings. This can cause issues
22+
# when working with files across different operating systems.
2023

2124
# - repo: https://github.com/psf/black
2225
# rev: 25.1.0 # Use the latest stable version

0 commit comments

Comments
 (0)