diff --git a/.zuul.yaml b/.zuul.yaml index 5da42a9..444e46e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -6,11 +6,21 @@ run: playbooks/build.yaml nodeset: rdo-centos-9-stream +- job: + name: rdo-mkdocs-website-pymarkdown + parent: base + description: Run markdown linter + run: playbooks/lint_pymarkdown.yaml + nodeset: rdo-centos-9-stream + voting: false + - project: check: jobs: - rdo-mkdocs-website-build + - rdo-mkdocs-website-pymarkdown gate: jobs: - rdo-mkdocs-website-build + - rdo-mkdocs-website-pymarkdown diff --git a/playbooks/lint_pymarkdown.yaml b/playbooks/lint_pymarkdown.yaml new file mode 100644 index 0000000..25a9cd3 --- /dev/null +++ b/playbooks/lint_pymarkdown.yaml @@ -0,0 +1,22 @@ +- hosts: all + tasks: + - name: Install required packages + become: true + package: + name: + - python3 + - python3-pip + state: present + + # https://github.com/jackdewinter/pymarkdown + - name: Install pymarkdown + pip: + name: pymarkdownlnt + + # Ignored rules: + # MD013 Line length + # MD033 Inline HTML + - name: Run markdown linter + command: pymarkdown -d MD013 -d MD033 scan -r . + args: + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"