From 9cc5edbf45e52bd9d2906eb4595569e7417424c9 Mon Sep 17 00:00:00 2001 From: karolinku Date: Wed, 19 Jun 2024 15:53:34 +0200 Subject: [PATCH] Add playbook to run markdown linter Set temporary to non-voting, until final documentation review. Change-Id: Ie1a0139625c62f52277c31c307049ff417675242 --- .zuul.yaml | 10 ++++++++++ playbooks/lint_pymarkdown.yaml | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 playbooks/lint_pymarkdown.yaml 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 }}"