]> granicus.if.org Git - curl/commitdiff
travis: add a "make tidy" build that runs clang-tidy
authorDaniel Stenberg <daniel@haxx.se>
Sat, 27 Oct 2018 14:02:48 +0000 (16:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 29 Oct 2018 07:11:33 +0000 (08:11 +0100)
Closes #3182

.travis.yml

index 202242fa6820d43c5ff0267980d46213ba47a459..ab119272e055d36ee20bf185568d870ada068d31 100644 (file)
@@ -39,6 +39,7 @@ addons:
             - libunistring-dev # for libidn2 needed by libpsl
             - libnss3-dev
             - gnutls-bin
+            - clang-tidy-6.0
 
 matrix:
     include:
@@ -137,6 +138,10 @@ matrix:
           compiler: clang
           dist: trusty
           env: T=fuzzer
+        - os: linux
+          compiler: clang
+          dist: trusty
+          env: T=tidy
 
 install:
   - if [ "$T" = "coverage" ]; then pip2 install --user cpp-coveralls; fi
@@ -308,6 +313,12 @@ script:
                 make checksrc
              fi
         fi
+    - |
+        set -eo pipefail
+        if [ "$T" = "tidy" ]; then
+             ./configure --enable-warnings --enable-werror $C
+             make && make tidy
+        fi
     - |
         set -eo pipefail
         if [ "$T" = "iconv" ]; then