mirror of
https://github.com/containers/podman.git
synced 2025-10-09 23:15:39 +08:00
Exclude symlink from pre-commit end-of-file-fixer
Git on Windows clones the symlink `test/python/requirements.txt` as a regular file. That's not a big deal except that `pre-commit`, executed by `winmake.ps1 lint`, complains because there is no new line at end of the file. To fix `winmake.ps1 lint` we exclude the symlink in `pre-commit` hook `end-of-file-fixer` configuration. Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
@ -8,11 +8,12 @@ repos:
|
||||
# trailing whitespace as part of its format. We can work around that,
|
||||
# but unfortunately the buildah repo has some files with tabs, which
|
||||
# git-diff formats as '[+/-]<space><tab>', which these hooks choke on.
|
||||
# `contrib/systemd/user` is a symlink but for some reason, on windows,
|
||||
# pre-commit consider it as a regular file and tries to fix it.
|
||||
# Just disable checks on these files as a special case.
|
||||
# `contrib/systemd/user` and `test/python/requirements.txt` are symlinks
|
||||
# but for some reason, on windows, pre-commit consider it as a regular
|
||||
# file and tries to fix it. Just disable checks on these files as a
|
||||
# special case.
|
||||
- id: end-of-file-fixer
|
||||
exclude: test/buildah-bud/buildah-tests.diff|contrib/systemd/user
|
||||
exclude: test/buildah-bud/buildah-tests.diff|contrib/systemd/user|test/python/requirements.txt
|
||||
- id: trailing-whitespace
|
||||
exclude: test/buildah-bud/buildah-tests.diff|test/e2e/quadlet/remap-keep-id2.container|test/e2e/quadlet/line-continuation-whitespace.container
|
||||
- id: mixed-line-ending
|
||||
|
Reference in New Issue
Block a user