From 84200615bf92319939e126f74506db92278e98ef Mon Sep 17 00:00:00 2001 From: emo Date: Sat, 2 Mar 2024 02:30:05 +0100 Subject: [PATCH] Set up proper task dependency for linters --- README.md | 4 ++++ Taskfile.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index de66db5..4193fb8 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,10 @@ Use `ansible-lint` to verify good practices relevant to Ansible. task lint-ansible ``` +Note that this task depends on `lint-yml`, which means that linting YML will +happen before linting the Ansible code base. Linting the Ansible code base will +only be triggered when linting all YML documents in the repository has been successful. + ## YAML code formatting Navigate to the root folder of the local copy of this git repository. diff --git a/Taskfile.yml b/Taskfile.yml index a9a8aec..1f15e45 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -6,4 +6,5 @@ tasks: lint-yml: cmds: [yamllint .] lint-ansible: + deps: [lint-yml] cmds: [LC_ALL=C.UTF-8 ansible-lint .]