From e20cb019bd9036ba0a50ede2c11ae7eca25269bf Mon Sep 17 00:00:00 2001 From: s-martin Date: Fri, 10 May 2024 23:51:09 +0200 Subject: [PATCH] add markdownlint action and config --- .github/workflows/markdown.yml | 32 +++++++++++++++++++ .markdownlint-cli2.yml | 57 ++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 .github/workflows/markdown.yml create mode 100644 .markdownlint-cli2.yml diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml new file mode 100644 index 000000000..9b2d7c262 --- /dev/null +++ b/.github/workflows/markdown.yml @@ -0,0 +1,32 @@ +name: Markdown Linting + +on: + push: + branches-ignore: + - 'future3/**' + branches: + - develop + - master + paths: + - '**.md' + pull_request: + branches: + - develop + - master + paths: + - '**.md' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Linting markdown + uses: DavidAnson/markdownlint-cli2-action@v15 + with: + config: .markdownlint-cli2.yaml + #continue-on-error: true diff --git a/.markdownlint-cli2.yml b/.markdownlint-cli2.yml new file mode 100644 index 000000000..eba671664 --- /dev/null +++ b/.markdownlint-cli2.yml @@ -0,0 +1,57 @@ +# +# markdownlint-cli2 configuration, see https://github.com/DavidAnson/markdownlint-cli2?tab=readme-ov-file#configuration +# + +# rules, see https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md +config: + line-length: false + # ignore dollar signs + commands-show-output: false + no-trailing-punctuation: false + no-duplicate-heading: + siblings_only: true + # allow some tags we use for formatting + no-inline-html: + allowed_elements: [ "details", "summary" ] + +# Include a custom rule package +#customRules: +# - markdownlint-rule-titlecase + +# Fix no fixable errors +fix: false + +# Define a custom front matter pattern +#frontMatter: "[^]*<\/head>" + +# Define glob expressions to use (only valid at root) +globs: + - "**.md" + +# Define glob expressions to ignore +ignores: + - "documentation/developers/docstring/*" + - "src/**" + +# Use a plugin to recognize math +#markdownItPlugins: +# - +# - "@iktakahiro/markdown-it-katex" + +# Additional paths to resolve module locations from +#modulePaths: +# - "./modules" + +# Enable inline config comments +noInlineConfig: false + +# Disable progress on stdout (only valid at root) +noProgress: true + +# Use a specific formatter (only valid at root) +#outputFormatters: +# - +# - markdownlint-cli2-formatter-default + +# Show found files on stdout (only valid at root) +showFound: true \ No newline at end of file