zuul-jobs/roles/markdownlint/tasks/main.yaml
Ian Wienand f76cfbab11 linters: fix spaces between filters
This fixes a number of places where we do not have spaces between
filters.  I think that this is a reasonable rule for readability (I
also think it probably was enforced, but maybe later versions got
better at detecting it?).

These are detected by a later version of Ansible lint; this change
should have no operational change to any roles but prepares us to
update in a follow-on change.

Change-Id: I07e1a109b87adce86f483d14d7e02fcecb8313d5
2022-07-27 17:13:39 +10:00

19 lines
505 B
YAML

- name: Find all .md files
find:
paths: "{{ zuul_work_dir }}"
pattern: "*.md"
register: markdown_find
- name: Run markdownlint
shell: |
set -o pipefail
set -e
~/.markdownlint/node_modules/.bin/markdownlint {{ zj_markdown | relpath(zuul_work_dir) }} 2>&1 | tee -a markdownlint.txt
args:
chdir: "{{ zuul_work_dir }}"
executable: /bin/bash
loop: "{{ markdown_find.files | map(attribute='path') | list }}"
loop_control:
loop_var: zj_markdown
changed_when: false