diff --git a/src/flake8/main/git.py b/src/flake8/main/git.py index 3cda3c5..ac6a2de 100644 --- a/src/flake8/main/git.py +++ b/src/flake8/main/git.py @@ -56,7 +56,9 @@ def hook(lazy=False, strict=False): update_paths(app.file_checker_manager, tempdir) app.report_errors() - if strict: + if strict and app.result_count: + print("flake8 checks failed. Please fix, or force with " + "'git commit --no-verify'") return app.result_count return 0