Files
ROCm/.github/workflows/linting.yml
Mészáros Gergely ec8496041a ci: change markdown linting to use the NodeJs markdownlint (#2180)
* ci: change markdown linting to use the NodeJs markdownlint

The original ruby based markdownlint has a few shortcomings not known
when it was introduced:
- no support for myst extensions
- no support for disabling specific rules for specific files or regions

These two combined make it very hard to use when used for this project
when it has false positives around myst extensions.

Luckily there's a NodeJS based version of markdownlint [1] supporting the
same ruleset that is more configurable:
- seems to support myst extensions better
- has an html comment based syntax to disable specific rules

The library seem to be better maintained too and with better tooling:
e.g. there's a vscode extension using the engine for local use:
markdownlint (DavidAnson.vscode-markdownlint).

[1]: https://github.com/DavidAnson/markdownlint

* docs: hotfix empty links

There are missing links in the docs, these should get fixed, but for now
they are just monkey patched to make CI happy.

* docs: fix links

---------

Co-authored-by: Nara Prasetya <nara@streamhpc.com>
2023-05-25 09:51:19 -06:00

57 lines
1.5 KiB
YAML

name: Linting
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
lint-rest:
name: "RestructuredText"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install rst-lint
run: pip install restructuredtext-lint
- name: Lint ResT files
run: rst-lint ${{ join(github.workspace, '/docs') }}
lint-md:
name: "Markdown"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use markdownlint-cli2
uses: DavidAnson/markdownlint-cli2-action@v10.0.1
with:
globs: '**/*.md'
spelling:
name: "Spelling"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Fetch config
shell: sh
run: |
curl --silent --show-error --fail --location https://raw.github.com/RadeonOpenCompute/rocm-docs-core/develop/.spellcheck.yaml -O
curl --silent --show-error --fail --location https://raw.github.com/RadeonOpenCompute/rocm-docs-core/develop/.wordlist.txt >> .wordlist.txt
- name: Run spellcheck
uses: rojopolis/spellcheck-github-actions@0.30.0
- name: On fail
if: failure()
run: |
echo "Please check for spelling mistakes or add them to '.wordlist.txt' in either the root of this project or in rocm-docs-core."