Unverified Commit ccb32e8e authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] use 'pre-commit' to run 'cmakelint' (#6993)


Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
parent 5c5cd58e
...@@ -9,19 +9,6 @@ cpplint \ ...@@ -9,19 +9,6 @@ cpplint \
|| exit 1 || exit 1
echo "done running cpplint" echo "done running cpplint"
echo "running cmakelint"
find \
. \
-type f \
\( -name CMakeLists.txt -o -path "./cmake/*.cmake" \) \
-not -path './external_libs/*' \
-exec cmakelint \
--linelength=120 \
--filter=-convention/filename,-package/stdargs,-readability/wonkycase \
{} \+ \
|| exit 1
echo "done running cmakelint"
echo "checking that all OpenMP pragmas specify num_threads()" echo "checking that all OpenMP pragmas specify num_threads()"
get_omp_pragmas_without_num_threads() { get_omp_pragmas_without_num_threads() {
grep \ grep \
......
...@@ -105,7 +105,6 @@ if [[ $TASK == "lint" ]]; then ...@@ -105,7 +105,6 @@ if [[ $TASK == "lint" ]]; then
conda create -q -y -n "${CONDA_ENV}" \ conda create -q -y -n "${CONDA_ENV}" \
"${CONDA_PYTHON_REQUIREMENT}" \ "${CONDA_PYTHON_REQUIREMENT}" \
'biome>=1.9.3' \ 'biome>=1.9.3' \
'cmakelint>=1.4.3' \
'cpplint>=1.6.0' \ 'cpplint>=1.6.0' \
'matplotlib-base>=3.9.1' \ 'matplotlib-base>=3.9.1' \
'mypy>=1.11.1' \ 'mypy>=1.11.1' \
......
...@@ -17,6 +17,11 @@ repos: ...@@ -17,6 +17,11 @@ repos:
hooks: hooks:
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/cmake-lint/cmake-lint
rev: '1.4.3'
hooks:
- id: cmakelint
args: ["--linelength=120", "--filter=-convention/filename,-package/stdargs,-readability/wonkycase"]
- repo: https://github.com/adrienverge/yamllint - repo: https://github.com/adrienverge/yamllint
rev: v1.37.1 rev: v1.37.1
hooks: hooks:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment