mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
remove support for top-level list format
This commit is contained in:
parent
40c5bdad65
commit
0024484f5b
3 changed files with 66 additions and 79 deletions
|
|
@ -120,14 +120,6 @@ def test_validate_config_main_ok():
|
|||
assert not validate_config_main(('.pre-commit-config.yaml',))
|
||||
|
||||
|
||||
def test_validate_config_old_list_format_ok(tmpdir, cap_out):
|
||||
f = tmpdir.join('cfg.yaml')
|
||||
f.write('- {repo: meta, hooks: [{id: identity}]}')
|
||||
assert not validate_config_main((f.strpath,))
|
||||
msg = '[WARNING] normalizing pre-commit configuration to a top-level map'
|
||||
assert msg in cap_out.get()
|
||||
|
||||
|
||||
def test_validate_warn_on_unknown_keys_at_repo_level(tmpdir, caplog):
|
||||
f = tmpdir.join('cfg.yaml')
|
||||
f.write(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue