From abdcd6bde7329eae0506e339315f2a6b353d9787 Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Mon, 27 Jan 2025 04:08:23 -0500 Subject: [PATCH] Add venv checksum file to the sources fields of all public linting tasks --- taskfiles/lint-cmake.yaml | 5 +++++ taskfiles/lint-yaml.yaml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/taskfiles/lint-cmake.yaml b/taskfiles/lint-cmake.yaml index 30a1545f..f3f2724a 100644 --- a/taskfiles/lint-cmake.yaml +++ b/taskfiles/lint-cmake.yaml @@ -4,6 +4,7 @@ tasks: cmake-check: desc: "Runs the CMake linters." sources: &cmake_format_src_files + - "{{.G_LINT_VENV_CHECKSUM_FILE}}" - "{{.ROOT_DIR}}/**/*.cmake" - "{{.ROOT_DIR}}/**/*.cmake.in" - "{{.ROOT_DIR}}/**/CMakeLists.txt" @@ -11,6 +12,8 @@ tasks: - exclude: "{{.ROOT_DIR}}/**/build/*" - exclude: "{{.ROOT_DIR}}/**/submodules/*" - exclude: "{{.ROOT_DIR}}/**/tools/*" + deps: + - "venv" cmds: - task: "gersemi" vars: @@ -22,6 +25,8 @@ tasks: cmake-fix: desc: "Runs the CMake linters and fixes all violations." sources: *cmake_format_src_files + deps: + - "venv" cmds: - task: "gersemi" vars: diff --git a/taskfiles/lint-yaml.yaml b/taskfiles/lint-yaml.yaml index a15faa63..0a7f494f 100644 --- a/taskfiles/lint-yaml.yaml +++ b/taskfiles/lint-yaml.yaml @@ -7,15 +7,16 @@ tasks: - "yaml-fix" desc: "Runs the YAML linters. Only checks for warnings and violations." sources: + - "{{.G_LINT_VENV_CHECKSUM_FILE}}" - "{{.ROOT_DIR}}/**/*.yaml" - "{{.ROOT_DIR}}/**/*.yml" - "{{.TASKFILE}}" - exclude: "{{.ROOT_DIR}}/**/build/*" - exclude: "{{.ROOT_DIR}}/**/submodules/*" - exclude: "{{.ROOT_DIR}}/**/tools/*" + dir: "{{.ROOT_DIR}}" deps: - "venv" - dir: "{{.ROOT_DIR}}" cmds: - |- . "{{.G_LINT_VENV_DIR}}/bin/activate"