Skip to content

Commit

Permalink
add markdownlint action and config
Browse files Browse the repository at this point in the history
  • Loading branch information
s-martin committed May 10, 2024
1 parent 8396f7c commit e20cb01
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -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
57 changes: 57 additions & 0 deletions .markdownlint-cli2.yml
Original file line number Diff line number Diff line change
@@ -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>[^]*<\/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

0 comments on commit e20cb01

Please sign in to comment.