mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-08 04:34:16 +00:00
Forbid the combination of unique and ignore case options per maintainers comments in #794. Removes a test that is no longer valid now that this combination is no longer supported. Closes #794.
This commit is contained in:
parent
4dcb74a498
commit
3d305e15ef
2 changed files with 5 additions and 6 deletions
|
|
@ -65,6 +65,11 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||||
)
|
)
|
||||||
args = parser.parse_args(argv)
|
args = parser.parse_args(argv)
|
||||||
|
|
||||||
|
if args.ignore_case and args.unique:
|
||||||
|
print('ERROR: usage of --unique and --ignore-case is unsupported. \
|
||||||
|
Please update your configuration.')
|
||||||
|
return FAIL
|
||||||
|
|
||||||
retv = PASS
|
retv = PASS
|
||||||
|
|
||||||
for arg in args.filenames:
|
for arg in args.filenames:
|
||||||
|
|
|
||||||
|
|
@ -68,12 +68,6 @@ from pre_commit_hooks.file_contents_sorter import PASS
|
||||||
(
|
(
|
||||||
b'fee\nFie\nFoe\nfum\n',
|
b'fee\nFie\nFoe\nfum\n',
|
||||||
['--unique', '--ignore-case'],
|
['--unique', '--ignore-case'],
|
||||||
PASS,
|
|
||||||
b'fee\nFie\nFoe\nfum\n',
|
|
||||||
),
|
|
||||||
(
|
|
||||||
b'fee\nfee\nFie\nFoe\nfum\n',
|
|
||||||
['--unique', '--ignore-case'],
|
|
||||||
FAIL,
|
FAIL,
|
||||||
b'fee\nFie\nFoe\nfum\n',
|
b'fee\nFie\nFoe\nfum\n',
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue