File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -3,25 +3,33 @@ version: "3"
33tasks :
44 cmake-check :
55 desc : " Runs the CMake linters."
6+ sources : &cmake_format_src_files
7+ - " {{.ROOT_DIR}}/**/*.cmake"
8+ - " {{.ROOT_DIR}}/**/*.cmake.in"
9+ - " {{.ROOT_DIR}}/**/CMakeLists.txt"
10+ - " {{.TASKFILE}}"
11+ - exclude : " {{.ROOT_DIR}}/**/build/*"
612 deps :
713 - " venv"
814 cmds :
915 - task : " cmake"
1016 vars :
1117 FLAGS : " --diff --color"
18+ - task : " cmake"
19+ silent : true
20+ vars :
21+ FLAGS : " --check"
1222
1323 cmake-fix :
1424 desc : " Runs the CMake linters and fixes all violations."
25+ sources : *cmake_format_src_files
1526 deps :
1627 - " venv"
1728 cmds :
1829 - task : " cmake"
1930 vars :
2031 FLAGS : " --in-place"
2132
22- # Lint all CMake files, excluding those located in build directories.
23- #
24- # @param {string} FLAGS Options passed into the CMake linter gersemi.
2533 cmake :
2634 internal : true
2735 requires :
3240 - |-
3341 . "{{.G_LINT_VENV_DIR}}/bin/activate"
3442 find . \
35- -path ./build -prune -o \( \
36- -name "CMakeLists.txt" -o \
37- -name "*.cmake" -o \
38- -name "*.cmake.in" \
39- \) -print0 | \
40- xargs -0 --no-run-if-empty gersemi {{.FLAGS}}
43+ -path ./build -prune -o \
44+ \( -iname "CMakeLists.txt" -o -iname "*.cmake" -o -iname "*.cmake.in" \) \
45+ -print0 | \
46+ xargs -0 --no-run-if-empty gersemi {{.FLAGS}}
You can’t perform that action at this time.
0 commit comments