Run clang-tidy from the 5.12-clang pipeline
authorKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 27 May 2020 16:44:25 +0000 (18:44 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 27 May 2020 16:44:25 +0000 (18:44 +0200)
This should pass, with the minimal .clang-tidy which was provided. Other
PRs should be done to enable further checks.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
.clang-tidy [new file with mode: 0644]
.drone.yml

diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644 (file)
index 0000000..9782cf4
--- /dev/null
@@ -0,0 +1,14 @@
+Checks: '-*,
+    modernize-make-shared,
+    modernize-replace-*,
+    modernize-shrink-to-fit,
+    modernize-use-bool-literals,
+    modernize-use-emplace,
+    modernize-use-noexcept,
+    modernize-use-transparent-functors,
+    modernize-use-uncaught-exceptions,
+'
+WarningsAsErrors: '*'
+HeaderFilterRegex: '.*'
+AnalyzeTemporaryDtors: false
+FormatStyle:     none
index b07be40b0d42a0e45fa9024f54b880c41882af19..78b525637e57dde58596495655038df7ef673b8e 100644 (file)
@@ -83,11 +83,15 @@ steps:
       export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
       mkdir build &&
       cd build &&
-      cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
+      cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DNO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
       make &&
       useradd -m -s /bin/bash test &&
       chown -R test:test . &&
       su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test"
+    # Static analysis with clang-tidy
+    - /bin/bash -c "
+      ln -s build/compile_commands.json . &&
+      run-clang-tidy-6.0"
 trigger:
   branch:
     - master