mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-18 11:31:46 +04:00
Added config parameter hide_skipped
This commit is contained in:
parent
b3582dfd31
commit
7c883d038d
7 changed files with 130 additions and 8 deletions
|
|
@ -315,3 +315,24 @@ def test_warn_additional(schema):
|
|||
x for x in schema.items if isinstance(x, cfgv.WarnAdditionalKeys)
|
||||
]
|
||||
assert allowed_keys == set(warn_additional.keys)
|
||||
|
||||
|
||||
def test_hide_skipped_passing(tmpdir, caplog):
|
||||
f = tmpdir.join('cfg.yaml')
|
||||
f.write(
|
||||
'hide_skipped: True\n'
|
||||
'repos:\n'
|
||||
'- repo: https://gitlab.com/pycqa/flake8\n'
|
||||
' rev: 3.7.7\n'
|
||||
' hooks:\n'
|
||||
' - id: flake8\n',
|
||||
)
|
||||
ret_val = validate_config_main((f.strpath,))
|
||||
assert not ret_val
|
||||
assert caplog.record_tuples != [
|
||||
(
|
||||
'pre_commit',
|
||||
logging.WARNING,
|
||||
'Unexpected key(s) present at root: hide_skipped',
|
||||
),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue