-
-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Description
I am on v.4.4.0
, Python 3.11.4
, macOS Ventura 13.4.1
.
My .pre-commit-config.yaml
:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: end-of-file-fixer
- id: file-contents-sorter
files: ^requirements\/.+\.in$
# args: [--unique, --ignore-case]
The files are intentionally empty – I'm in the planning stage, they are just placeholders for requriements1.
To the point: file-contents-sorter
adds an extra blank to them, what results in a confict with end-of-file-fixer
. I am not sure if that is the expected behavior... Updating args
doesn't have any effect.
$ git:(install-and-configure-pre-commit) : pre-commit run --all-files
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook
Fixing requirements/build.in
Fixing requirements/lint.in
Fixing requirements/test.in
file contents sorter.....................................................Failed
- hook id: file-contents-sorter
- exit code: 1
- files were modified by this hook
Sorting requirements/build.in
Sorting requirements/lint.in
Sorting requirements/test.in
Footnotes
-
Yes, I know that I can use
requirements-txt-fixer
particularly for requirements. 😄 I will do. For that issue it doesn't matter. ↩