Commit ce5ff469 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

enabled modernize-deprecated-headers in clang tidy

added filter to exclude external libraries
parent aa5ccd2e
---
Checks: '-*,modernize-*,-modernize-use-auto,-modernize-loop-convert,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-using,-modernize-avoid-bind,-modernize-return-braced-init-list,-modernize-deprecated-headers,-modernize-use-transparent-functors,-modernize-redundant-void-arg'
Checks: '-*,modernize-*,-modernize-use-auto,-modernize-loop-convert,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-using,-modernize-avoid-bind,-modernize-return-braced-init-list,-modernize-use-transparent-functors,-modernize-redundant-void-arg'
WarningsAsErrors: '*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
......
......@@ -1151,6 +1151,7 @@ clang-tidy:
- cd $CI_PROJECT_DIR/build
- cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWALBERLA_BUFFER_DEBUG=ON -DWALBERLA_BUILD_TESTS=ON -DWALBERLA_BUILD_BENCHMARKS=ON -DWALBERLA_BUILD_TUTORIALS=ON -DWALBERLA_BUILD_TOOLS=ON -DWALBERLA_BUILD_WITH_MPI=ON -DWALBERLA_BUILD_WITH_OPENMP=ON -DCMAKE_BUILD_TYPE=Debug -DWALBERLA_DOUBLE_ACCURACY=ON
- cmake . -LAH
- utilities/filterCompileCommands.py compile_commands.json
- run-clang-tidy.py -quiet | tee clang-tidy-output.txt
artifacts:
paths:
......
......@@ -1335,4 +1335,4 @@ waLBerla_export()
############################################################################################################################
waLBerla_link_files_to_builddir( .clang-tidy )
waLBerla_link_files_to_builddir( run-clang-tidy.py )
add_subdirectory( utilities )
......@@ -39,7 +39,7 @@ void printStacktrace()
#if defined(WALBERLA_CXX_COMPILER_IS_GNU) || defined(WALBERLA_CXX_COMPILER_IS_INTEL) || defined( WALBERLA_CXX_COMPILER_IS_CLANG)
#include <execinfo.h>
#include <stdlib.h>
#include <cstdlib>
#include <string>
namespace walberla {
......
......@@ -26,7 +26,7 @@
#include "core/mpi/MPIManager.h"
#include <limits>
#include <stdlib.h>
#include <cstdlib>
#include <vector>
......
waLBerla_link_files_to_builddir( filterCompileCommands.py )
#!/usr/bin/env python3
import json
import sys
def compileCommandSelector(x):
return not ("extern" in x["file"])
if __name__ == "__main__":
if (len(sys.argv) != 2):
print("usage: ./filterCompileCommands.py compile_commands.json")
exit(-1)
filename = sys.argv[1]
print("loading compile commands file: {}".format(filename))
fin = open(filename, "r")
cc = json.load(fin)
fin.close()
print("compile commands read: {}".format(len(cc)))
cc_filtered = list( filter(compileCommandSelector, cc) )
print("compile commands filtered: {}".format(len(cc_filtered)))
fout = open(filename, "w")
json.dump(cc_filtered, fout)
fout.close()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment