Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
ccb32e8e
Unverified
Commit
ccb32e8e
authored
Aug 10, 2025
by
James Lamb
Committed by
GitHub
Aug 10, 2025
Browse files
[ci] use 'pre-commit' to run 'cmakelint' (#6993)
Co-authored-by:
Nikita Titov
<
nekit94-08@mail.ru
>
parent
5c5cd58e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
14 deletions
+5
-14
.ci/lint-cpp.sh
.ci/lint-cpp.sh
+0
-13
.ci/test.sh
.ci/test.sh
+0
-1
.pre-commit-config.yaml
.pre-commit-config.yaml
+5
-0
No files found.
.ci/lint-cpp.sh
View file @
ccb32e8e
...
@@ -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
\
...
...
.ci/test.sh
View file @
ccb32e8e
...
@@ -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'
\
...
...
.pre-commit-config.yaml
View file @
ccb32e8e
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment