xgboost/tests/ci_build/clang_tidy.sh
Jiaming Yuan 7b9043cf71
Fix clang-tidy warnings. (#4149)
* Upgrade gtest for clang-tidy.
* Use CMake to install GTest instead of mv.
* Don't enforce clang-tidy to return 0 due to errors in thrust.
* Add a small test for tidy itself.

* Reformat.
2019-03-13 02:25:51 +08:00

19 lines
522 B
Bash
Executable File

#!/bin/bash
export GTEST_PKG_NAME=release-1.8.1
export GTEST_DIR_NAME=googletest-${GTEST_PKG_NAME} # uncompressed directory
export GTEST_ZIP_FILE=${GTEST_PKG_NAME}.zip # downloaded zip ball name
rm -rf gtest googletest-release*
wget -nc https://github.com/google/googletest/archive/${GTEST_ZIP_FILE}
unzip -n ${GTEST_ZIP_FILE}
mv ${GTEST_DIR_NAME} gtest && cd gtest
cmake . -DCMAKE_INSTALL_PREFIX=./ins && make
make install
cd ..
rm ${GTEST_ZIP_FILE}
python3 tests/ci_build/tidy.py --gtest-path=${PWD}/gtest/ins