File tree Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ # yamllint disable-line rule:line-length
2+ # yaml-language-server: $schema=https://raw.githubusercontent.com/BlankSpruce/gersemi/master/gersemi/configuration.schema.json
3+
4+ line_length: 100
5+ list_expansion: "favour-expansion"
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.16.3)
2+ project (YSTDLIB_CPP LANGUAGES CXX)
3+
4+ set (YSTDLIB_CPP_VERSION "0.0.1" CACHE STRING "Project version." )
Original file line number Diff line number Diff line change 11clang-format>=19.1.6
2+ colorama>=0.4.6
3+ gersemi>=0.16.2
24yamllint>=1.35.1
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ tasks :
4+ cmake-check :
5+ 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/*"
12+ - exclude : " {{.ROOT_DIR}}/**/submodules/*"
13+ - exclude : " {{.ROOT_DIR}}/**/tools/*"
14+ cmds :
15+ - task : " gersemi"
16+ vars :
17+ FLAGS : " --diff --color"
18+ - task : " gersemi"
19+ silent : true
20+ vars :
21+ FLAGS : " --check"
22+
23+ cmake-fix :
24+ desc : " Runs the CMake linters and fixes all violations."
25+ sources : *cmake_format_src_files
26+ cmds :
27+ - task : " gersemi"
28+ vars :
29+ FLAGS : " --in-place"
30+
31+ gersemi :
32+ internal : true
33+ requires :
34+ vars :
35+ - " FLAGS"
36+ dir : " {{.ROOT_DIR}}"
37+ deps :
38+ - " venv"
39+ cmds :
40+ - |-
41+ . "{{.G_LINT_VENV_DIR}}/bin/activate"
42+ find . \
43+ \( -path '**/build' -o -path '**/submodules' -o -path '**/tools' \) -prune -o \
44+ \( -iname "CMakeLists.txt" -o -iname "*.cmake" -o -iname "*.cmake.in" \) \
45+ -print0 | \
46+ xargs -0 --no-run-if-empty gersemi {{.FLAGS}}
Original file line number Diff line number Diff line change 11version : " 3"
22
33includes :
4+ cmake :
5+ flatten : true
6+ taskfile : " ./lint-cmake.yaml"
47 cpp :
58 flatten : true
69 taskfile : " ./lint-cpp.yaml"
@@ -18,12 +21,14 @@ tasks:
1821 check :
1922 desc : " Runs the full suite of linters to identify warnings and violations."
2023 cmds :
24+ - task : " cmake-check"
2125 - task : " cpp-check"
2226 - task : " yaml-check"
2327
2428 fix :
2529 desc : " Runs the full suite of linters and fixes some violations."
2630 cmds :
31+ - task : " cmake-fix"
2732 - task : " cpp-fix"
2833 - task : " yaml-fix"
2934
You can’t perform that action at this time.
0 commit comments