Skip to content

Commit d8d8de8

Browse files
authored
Adjust first verbosity level to be less noisy (#651)
See #648 for motivation.
1 parent 953c0e8 commit d8d8de8

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Unreleased
1313
- Update vendored schemas: bitbucket-pipelines, circle-ci, gitlab-ci, mergify, renovate
1414
(2026-02-22)
1515
- Removed support for Python 3.9
16+
- Verbose text output has been adjusted. At the first verbosity level (`-v`),
17+
all errors are reported but the checked filenames are no longer displayed. The
18+
list of filenames checked is now emitted at the second verbosity level (`-vv`)
19+
and above. (:issue:`648`)
1620

1721
0.36.2
1822
------

src/check_jsonschema/reporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def report_success(self, result: CheckResult) -> None:
5757
return
5858
ok = click.style("ok", fg="green")
5959
self._echo(f"{ok} -- validation done")
60-
if self.verbosity > 1:
60+
if self.verbosity > 2:
6161
self._echo("The following files were checked:")
6262
for filename in result.successes:
6363
self._echo(f" {filename}")

tests/unit/test_reporters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def _make_success_result():
1515
return res
1616

1717

18-
@pytest.mark.parametrize("verbosity", (0, 1, 2))
18+
@pytest.mark.parametrize("verbosity", (0, 1, 2, 3))
1919
@pytest.mark.parametrize("use_report_result_path", (False, True))
2020
def test_text_format_success(capsys, verbosity, use_report_result_path):
2121
reporter = TextReporter(verbosity=verbosity)
@@ -27,7 +27,7 @@ def test_text_format_success(capsys, verbosity, use_report_result_path):
2727
assert captured.err == ""
2828
if verbosity == 0:
2929
assert captured.out == ""
30-
elif verbosity == 1:
30+
elif verbosity < 3:
3131
assert captured.out == "ok -- validation done\n"
3232
else:
3333
assert captured.out == textwrap.dedent("""\

0 commit comments

Comments
 (0)