Skip to content

Commit 0151da1

Browse files
authored
fix: Drop silent flag from lint:cmake-check command; Remove GNU-specific xargs flag; Avoid running lint:yaml unnecessarily. (#14)
1 parent 3b6997f commit 0151da1

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

taskfiles/lint-cmake.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ tasks:
1616
vars:
1717
FLAGS: "--diff --color"
1818
- task: "gersemi"
19-
silent: true
2019
vars:
2120
FLAGS: "--check"
2221

@@ -43,4 +42,4 @@ tasks:
4342
\( -path '**/build' -o -path '**/submodules' -o -path '**/tools' \) -prune -o \
4443
\( -iname "CMakeLists.txt" -o -iname "*.cmake" -o -iname "*.cmake.in" \) \
4544
-print0 | \
46-
xargs -0 --no-run-if-empty gersemi {{.FLAGS}}
45+
xargs -0 gersemi {{.FLAGS}}

taskfiles/lint-yaml.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@ tasks:
66
- "yaml-check"
77
- "yaml-fix"
88
desc: "Runs the YAML linters. Only checks for warnings and violations."
9+
sources:
10+
- "{{.ROOT_DIR}}/**/*.yaml"
11+
- "{{.ROOT_DIR}}/**/*.yml"
12+
- "{{.TASKFILE}}"
13+
- exclude: "{{.ROOT_DIR}}/**/build/*"
14+
- exclude: "{{.ROOT_DIR}}/**/submodules/*"
15+
- exclude: "{{.ROOT_DIR}}/**/tools/*"
916
deps:
1017
- "venv"
1118
dir: "{{.ROOT_DIR}}"
1219
cmds:
1320
- |-
1421
. "{{.G_LINT_VENV_DIR}}/bin/activate"
15-
yamllint \
16-
--config-file "tools/yscope-dev-utils/lint-configs/.yamllint.yml" \
17-
--strict \
18-
.github \
19-
taskfile.yaml \
20-
taskfiles/
22+
find . \
23+
\( -path '**/build' -o -path '**/submodules' -o -path '**/tools' \) -prune -o \
24+
\( -iname "*.yaml" -o -iname "*.yml" \) \
25+
-print0 | \
26+
xargs -0 yamllint \
27+
--config-file "tools/yscope-dev-utils/lint-configs/.yamllint.yml" \
28+
--strict

0 commit comments

Comments
 (0)