]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make check_format exit with the appropriate status (#565)
authorThomas Otto <thomas.otto@pdv-fs.de>
Tue, 24 Mar 2020 19:35:53 +0000 (20:35 +0100)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 19:35:53 +0000 (20:35 +0100)
Also print only diff to stdout and fix tabs.

dev.mk.in

index 690a70dc515a85de02e558f34afa322fec3e92e0..e5c455792a306f7f3061ca6d2eaf48369df1efe7 100644 (file)
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -212,8 +212,8 @@ check_format:
        @[ -t 1 ] && export cf_diff_color="--color=always"; \
        cd $(srcdir) && echo $(non_third_party_headers) $(non_third_party_sources) $(test_sources) | xargs -n1 -P1 \
            misc/run-clang-format --check || \
-               {  echo; echo "Error: Sources are not formatted with clang-format."; \
-                  echo 'Run "make format" or apply the above diff.'; }
+               { echo; echo "Error: Sources are not formatted with clang-format."; \
+                 echo 'Run "make format" or apply the above diff.'; echo; exit 1; } 1>&2
 
 # pip install compiledb
 compile_commands.json: