Open kenorb opened 3 years ago
I've a simple file template.j2:
template.j2
/** * @file * My file */
which doesn't have any trailing whitespace, however the hook reports otherwise in every single line.
I'm using .j2 extension as this is a Jinja2 template. If I change to .j3 it works fine.
.j2
.j3
$ pre-commit run -a Check for conflict markers and core.whitespace errors.......................Failed - hook id: git-check - exit code: 2 template.j2:1: trailing whitespace. +/** template.j2:2: trailing whitespace. + * @file template.j2:3: trailing whitespace. + * My file template.j2:4: trailing whitespace. + */
My .pre-commit-config.yaml:
.pre-commit-config.yaml
--- repos: - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: master hooks: - id: git-check
I've tried to add exclude: '(\.j2)$' but it didn't help.
exclude: '(\.j2)$'
I've a simple file
template.j2
:which doesn't have any trailing whitespace, however the hook reports otherwise in every single line.
I'm using
.j2
extension as this is a Jinja2 template. If I change to.j3
it works fine.My
.pre-commit-config.yaml
:I've tried to add
exclude: '(\.j2)$'
but it didn't help.