mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Report duplicate keys in check_json
Raise ValueError and return 1 if json contains duplicate keys
This commit is contained in:
parent
11a2fdbab8
commit
fe37451719
3 changed files with 22 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ from testing.util import get_resource_path
|
|||
('bad_json.notjson', 1),
|
||||
('bad_json_latin1.nonjson', 1),
|
||||
('ok_json.json', 0),
|
||||
('duplicate_key_json.json', 1),
|
||||
),
|
||||
)
|
||||
def test_main(capsys, filename, expected_retval):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue