xgboost/tests/ci_build/lint_cmake.sh
James Lamb 51e32e4905
[CI] add cmakelint to C++ linting task (#9641)
Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
2023-10-11 16:04:10 +08:00

15 lines
293 B
Bash

#!/bin/bash
set -e
cmake_files=$(
find . -name CMakeLists.txt -o -path "./cmake/*.cmake" \
| grep -v dmlc-core \
| grep -v gputreeshap
)
cmakelint \
--linelength=120 \
--filter=-convention/filename,-package/stdargs,-readability/wonkycase \
${cmake_files} \
|| exit 1