mirror of
https://github.com/ROCm/ROCm.git
synced 2026-01-08 22:28:06 -05:00
Spell checking (#2070)
* ci: cleanup linters and add spelling checker * docs: fix spelling and styling issues
This commit is contained in:
51
.github/workflows/linting.yml
vendored
Normal file
51
.github/workflows/linting.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Linting
|
||||
|
||||
on:
|
||||
push:
|
||||
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
|
||||
uses: actionshub/markdownlint@v3.1.3
|
||||
with:
|
||||
filesToIgnoreRegex: "CHANGELOG.md|tools\\/autotag\\/templates\\/."
|
||||
|
||||
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."
|
||||
Reference in New Issue
Block a user