diff --git a/.circleci/config.yml b/.circleci/config.yml index 79aece3..46472cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,6 +97,7 @@ jobs: QMAKE_SPEC: linux-clang QT_SELECT: opt-qt512 USE_TIDY: TRUE + CLANG_TIDY_EXECUTABLE: clang-tidy-7 MAKE_JOBS: 2 docker: - image: "ubuntu:xenial" diff --git a/build_scripts/linux/run-clang-tidy.sh b/build_scripts/linux/run-clang-tidy.sh index 7b38d58..9072d0c 100755 --- a/build_scripts/linux/run-clang-tidy.sh +++ b/build_scripts/linux/run-clang-tidy.sh @@ -1,10 +1,15 @@ set +e -clang-tidy-7 --version + +if [[ -z $CLANG_TIDY_EXECUTABLE ]]; then + CLANG_TIDY_EXECUTABLE='clang-tidy' +fi + +$CLANG_TIDY_EXECUTABLE --version ERROR=0 for file in $(find ../src -name "*.cpp"); do echo $file - clang-tidy-7 $file + $CLANG_TIDY_EXECUTABLE $file EXIT=$? if [[ $EXIT != 0 ]]; then diff --git a/docs/building_for_linux.md b/docs/building_for_linux.md index 05602a3..e223127 100644 --- a/docs/building_for_linux.md +++ b/docs/building_for_linux.md @@ -166,6 +166,8 @@ The following environmental variables are relevant for building the project. | `NO_X11` | If set the application will be compiled without X11 specific libraries. This disables certain things like sending keystrokes from VR. | | `NO_DBUS` | If set the application will be compiled without DBUS specific functionality. This disables certain things like media keys. | | `MAKE_JOBS` | Argument to `make --jobs`. Defaults to nothing (unlimited amount of jobs). | +| `CLANG_TIDY_EXECUTABLE` | Name of the `clang-tidy` executable. Defaults to `clang-tidy`. Used for specifying a specific version or path, for example `clang-tidy-7`. | + # Building