]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Check if formatting is ok 8582/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 27 Nov 2019 09:49:19 +0000 (10:49 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 27 Nov 2019 09:58:57 +0000 (10:58 +0100)
.circleci/config.yml

index 4b93200431c681e69fa253b10ef7cb6c537287bd..fdad96fd71fd79f8828ddf62eaf61709d983bfbe 100644 (file)
@@ -486,6 +486,24 @@ jobs:
           paths:
             - project
 
+  check-formatting:
+    docker:
+      - image: debian:buster
+    steps:
+      - run:
+          name: Install dependencies
+          command: |
+            apt-get update && apt-get -qq --no-install-recommends install \
+            clang-format git
+      - get-workspace
+      - run:
+          name: Check formatting
+          command: |
+            ./build-scripts/format-code pdns/recursordist/*.[ch][ch]
+            git diff
+            exit $(git diff | wc -l)
+          working_directory: ~/project
+
   build-auth:
     docker:
       - image: debian:buster
@@ -1402,6 +1420,9 @@ workflows:
       - test-auth-regress-tinydns:
           requires:
             - build-auth
+      - check-formatting:
+          requires:
+            - checkout
       - build-recursor:
           requires:
             - checkout