From b38f4a7f1c60105a2dff711ec8c9e8eacaac6c83 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Tue, 20 Jul 2021 22:38:21 +0200
Subject: [PATCH] STY: sort headers

---
 CMakeLists.txt | 3 ++-
 src/caosdb.cpp | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6616478..ed88fc0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,6 +93,7 @@ if(LINTING)
         message(STATUS "clang-tidy: ${clang_tidy}")
         set(_CMAKE_CXX_CLANG_TIDY
             "--warnings-as-errors=*"
+            "--header-filter=caosdb/.*[^\\\(\.pb\.h\\\)]$"
             "--fix")
         set(_CMAKE_CXX_CLANG_TIDY_CHECKS
           "--checks=*,-fuchsia-*,-llvmlibc-*,-llvm-else-after-return,-readability-else-after-return,-cppcoreguidelines-pro-type-vararg,-hicpp-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cert-err58-cpp")
@@ -122,7 +123,7 @@ if(LINTING)
             COMMAND ${iwyu}
             ARGS ${_CMAKE_CXX_INCLUDE_WHAT_YOU_USE} "-I${_OCTINCLUDEDIR}"
             "-std=c++17" "-I/usr/include" ${_MKOCTFILE_INCLUDES}
-            ${OCTAVE_CAOSDB_SRC}
+            ${OCTAVE_CAOSDB_SRC} "||" "true"
             DEPENDS ${OCTAVE_CAOSDB_SRC})
     endif()
 
diff --git a/src/caosdb.cpp b/src/caosdb.cpp
index added84..5fbc38a 100644
--- a/src/caosdb.cpp
+++ b/src/caosdb.cpp
@@ -1,11 +1,11 @@
-#include <mex.h>               // for mxArray, mexFunction
-#include <string.h>            // for strcmp
-#include <memory>              // for unique_ptr, __shared_ptr_access, shar...
-#include <string>              // for allocator, char_traits, operator+
 #include "caosdb/connection.h" // for Connection, ConnectionManager
 #include "caosdb/constants.h"  // for LIBCAOSDB_VERSION_MAJOR, LIBCAOSDB_VE...
 #include "caosdb/info.h"       // for VersionInfo
+#include "mex.h"               // for mxArray, mexFunction
 #include "mexproto.h"          // for mexPrintf, mxCreateString, mxGetChars
+#include <cstring>             // for strcmp
+#include <memory>              // for unique_ptr, __shared_ptr_access, shar...
+#include <string>              // for allocator, char_traits, operator+
 
 auto print_version() -> const char *;
 void print_usage();
-- 
GitLab