Skip to content

Commit

Permalink
doc: add pymarkdown tool
Browse files Browse the repository at this point in the history
pymarkdown provides checks for properly written markdown files.
It's quite configurable and checks for many items we choose not to
enforce, such as 80 character line length.  It can be configured so a CI
system could do checks on markdown files being submitted in a PR, but
for now, I'm just including the tool in the the list of packages
installed from pypi and a script to call it (checkmd.sh) with some
settings that limit what checks we're interested in (for now).

Signed-off-by: David B. Kinder <[email protected]>
  • Loading branch information
dbkinder committed Sep 6, 2024
1 parent 985fd59 commit 0eb4ab0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/checkmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation.
# SPDX-License-Identifier: Apache-2.0

# Use pymarkdown to recursively scan all markdown files for problems
# Disable rules we don't care to check. If you find others that you'd like to
# ignore, simply add them to this list

drules=line-length,no-bare-urls,no-multiple-blanks,blanks-around-fences,no-hard-tabs,blanks-around-headings
drules=$drules,fenced-code-language,no-duplicate-heading,no-emphasis-as-heading,no-trailing-spaces

pymarkdown --disable-rules $drules scan -r .

1 change: 1 addition & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ sphinx-tabs==3.4.5
myst-parser>=3.0
sphinx-md==0.0.3
sphinxcontrib-mermaid
pymarkdownlnt

0 comments on commit 0eb4ab0

Please sign in to comment.