[CI] add cmakelint to C++ linting task (#9641)
Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
This commit is contained in:
14
tests/ci_build/lint_cmake.sh
Normal file
14
tests/ci_build/lint_cmake.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user