Skip to content

Commit

Permalink
feat: add GH action markdown linting
Browse files Browse the repository at this point in the history
* specification file
* schema readme files
  • Loading branch information
jeremyfiel committed Nov 26, 2024
1 parent d02cff6 commit 9756ee2
Show file tree
Hide file tree
Showing 6 changed files with 1,286 additions and 337 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/validate-markdown.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: validate-markdown

# Author: @MikeRalphson
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/2130
# Author: @ralfhandl based on work of @MikeRalphson

#
# This workflow validates files in the versions directory matching 1.*.md
# This workflow validates markdown files in the `versions` and `schemas` directories matching *.md
#

# run this on push to any branch and creation of pull-requests
Expand All @@ -16,10 +15,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2 # checkout repo content
- uses: actions/setup-node@v1 # setup Node.js
- uses: actions/checkout@v4 # checkout repo content
with:
node-version: '18.x'
fetch-depth: 0
# - name: use the javascript environment from main
# run: |
# git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml
- uses: actions/setup-node@v4 # setup Node.js
with:
node-version: '20.x'
- name: Validate markdown
run: npx mdv versions/1.*.md

run: npx --yes mdv versions/*.md
- name: Lint markdown
run: npx --yes markdownlint-cli --config .markdownlint.yaml ./{versions,schemas/**}/*.md
12 changes: 12 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Unordered list indentation
MD007:
indent: 2

MD012: false # allow blank lines

MD013:
line_length: 800
tables: false

MD024: false # duplicate headings
MD033: false # inline HTML
Loading

0 comments on commit 9756ee2

Please sign in to comment.