Handy Git hooks to integrate with pre-commit framework.
- Configure pre-commit
- Two ways to invoke pre-commit
- Available hooks
- checkstyle-jar
- end-of-file
- trailing-whitespaces
- Hook ID:
trailing-whitespaces
Ensures there's no line trailing whitespaces.
--fix
if used, hook will correct invalid files in-place. Supported values areyes
andno
( default).
- repo: https://github.com/MarcinOrlowski/pre-commit-hooks
rev: main
hooks:
- id: trailing-whitespaces
# We do not want binary files to be touched
exclude_types: [ 'xml','png','jpeg','svg' ]
args: [ '--fix=yes' ]