diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..de4303bf8 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,4 @@ +--- +Checks: '-clang-analyzer-*,google-*,llvm-*,misc-*,readability-*,-google-build-explicit-make-pair,-google-explicit-constructor,-google-readability-braces-around-statements,-google-readability-casting,-google-readability-namespace-comments,-google-readability-function,-google-readability-todo,-google-runtime-int,-llvm-namespace-comment,-llvm-header-guard,-llvm-twine-local,-misc-argument-comment,-readability-braces-around-statements,-readability-identifier-naming' +... + diff --git a/scripts/modernize.sh b/scripts/modernize.sh new file mode 100755 index 000000000..ee0f2ed46 --- /dev/null +++ b/scripts/modernize.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# Runs the Clang Modernizer in parallel on the code base. +# Requires a compilation database in the build directory. + +git ls-files '*.cpp' | xargs -I{} -P $(nproc) clang-modernize -p build -final-syntax-check -format -style=file -summary -for-compilers=clang-3.4,gcc-4.8 -include . -exclude third_party {} diff --git a/scripts/tidy.sh b/scripts/tidy.sh new file mode 100755 index 000000000..7ecabfa45 --- /dev/null +++ b/scripts/tidy.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# Runs the Clang Tidy Tool in parallel on the code base. +# Requires a compilation database in the build directory. + +git ls-files '*.cpp' | grep -v third_party | xargs -I{} -P $(nproc) clang-tidy -p build -header-filter='.*' {} diff --git a/update_depdendencies.sh b/scripts/update_depdendencies.sh similarity index 92% rename from update_depdendencies.sh rename to scripts/update_depdendencies.sh index aa2ede5fc..e443cfa5f 100755 --- a/update_depdendencies.sh +++ b/scripts/update_depdendencies.sh @@ -3,7 +3,7 @@ OSMIUM_REPO=https://github.com/osmcode/libosmium.git OSMIUM_TAG=v2.3.0 -VARIANT_REPO=https://github.com/mapbox/variant.git +VARIANT_REPO=https://github.com/mapbox/variant.git VARIANT_TAG=v1.0 VARIANT_LATEST=$(curl https://api.github.com/repos/mapbox/variant/releases/latest | jq ".tag_name")