Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-circle

GitHub Action

Run markdownlint (mdl)

v1.0.12

Run markdownlint (mdl)

check-circle

Run markdownlint (mdl)

Run Markdown linter with given style file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run markdownlint (mdl)

uses: bewuethr/[email protected]

Learn more about this action in bewuethr/mdl-action

Choose a version

mdl-action

Linting Move release tags

This action runs the Ruby Markdown linter mdl on every Markdown file in the repository.

Inputs

style-file

Optional The path to the style file for mdl to use. See Creating styles to learn about markdownlint style files, and RULES.md for the individual rules.

Example usage

uses: bewuethr/mdl-action@v1
with:
  style-file: .github/workflows/style.rb

An example style file might look like this:

all

# Don't enforce line length in code blocks
rule 'MD013', :code_blocks => false

# Allow duplicate titles
exclude_rule 'MD024'

# Allow titles to end in question marks
rule 'MD026', :punctuation => '.,;:!'

# Don't force ordered lists with 1. 1. 1.
rule 'MD029', :style => :ordered

# Allow inline HTML
exclude_rule 'MD033'

Versions

To get the latest version of a major release, the major release without minor and patch release can be used.

To get the latest version of a minor release, the minor release without the patch release can be used.

For example: if the latest release is v1.1.2,

uses: bewuethr/mdl-action@v1

and

uses: bewuethr/[email protected]

and

uses: bewuethr/[email protected]

will fetch v1.1.2. The advantage of using just @v1 is that minor releases and patches are included without requiring a change; the advantage of using @v1.1.2 is knowing that the action does 100% the same thing every time.

This is done via the release-tag-tracker action.