Skip to content

Commit 0ab9fb4

Browse files
committed
Add more CMake filename patterns for linting.
1 parent 708957f commit 0ab9fb4

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

CMake/ystdlib-cpp-config.cmake.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ystdlib-cpp CMake configuration file
2+
3+
# gersemi: off
4+
@PACKAGE_INIT@
5+
# gersemi: on
6+
7+
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")

CMake/ystdlib-cpp-helpers.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ystdlib_cpp_library()
2+
#
3+
# CMake function to imitate Bazel's cc_library rule.
4+
# TODO: implement this function
5+
function(ystdlib_cpp_library)
6+
endfunction()

taskfiles/lint-cmake.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ tasks:
1919
vars:
2020
FLAGS: "--in-place"
2121

22+
# Lint all CMake files, excluding those located in build directories.
23+
#
24+
# @param {string} FLAGS Options passed into the CMake linter gersemi.
2225
cmake:
2326
internal: true
2427
requires:
@@ -29,7 +32,9 @@ tasks:
2932
- |-
3033
. "{{.G_LINT_VENV_DIR}}/bin/activate"
3134
find . \
32-
-path ./build -prune \
33-
-o -name CMakeLists.txt \
34-
-print0 | \
35-
xargs -0 --no-run-if-empty gersemi {{.FLAGS}}
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}}

0 commit comments

Comments
 (0)