-
Notifications
You must be signed in to change notification settings - Fork 865
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linting steps to doc-automation workflow (#1855)
* Add linting steps to doc-automation workflow * Move changes to lint.yml * Some improvements * Fix bug * Some enhancements * Fix bug * Fix some links, a few typos and also linting steps * Fix intel-extension links and some others * Fix some typos * Fix remaining typos * Fix some other links * Fix bug * Add some words to wordllist.txt * Add some other words to wordlist.txt * Fix some links and improve markdown-lin-check config * Fix bug * Temporary fix a link * Fix 4 remaining links * Fix typos * Fix typos * Fix bug * Improve spellcheck and fix misspellings * Clean wordlist.txt abit * Fix GitHub 403 errors From tcort/markdown-link-check#201 (comment) * Fix md-link-check version * Fix a link Co-authored-by: Mark Saroufim <[email protected]>
- Loading branch information
1 parent
b2f80d2
commit 3a7187c
Showing
53 changed files
with
650 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Test changed-files | ||
name: Lint changed files | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
@@ -20,18 +20,24 @@ jobs: | |
- name: Install lint utilities | ||
run: | | ||
pip install pre-commit | ||
pre-commit install | ||
pre-commit install | ||
- name: Get specific changed files | ||
id: changed-files-specific | ||
uses: tj-actions/[email protected] | ||
- name: Check links in all markdown files | ||
uses: gaurav-nelson/[email protected] | ||
with: | ||
use-verbose-mode: 'yes' | ||
config-file: "ts_scripts/markdown_link_check_config.json" | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
**/*.py | ||
- name: Lint all changed files | ||
run: | | ||
for file in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
pre-commit run --files $file | ||
done | ||
|
@@ -43,3 +49,33 @@ jobs: | |
echo "cd serve/" | ||
echo "pre-commit install" | ||
echo "pre-commit will lint your code for you, so git add and commit those new changes and this check should become green" | ||
spellcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install aspell aspell-en | ||
pip install pyspelling | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
**/*.md | ||
- name: Check spellings | ||
run: | | ||
sources="" | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
sources+=" -S $file" | ||
done | ||
pyspelling -c $GITHUB_WORKSPACE/ts_scripts/spellcheck_conf/spellcheck.yaml --name Markdown $sources | ||
- name: In the case of misspellings | ||
if: ${{ failure() }} | ||
run: | | ||
echo "Please fix the misspellings. If you are sure about some of them, " | ||
echo "so append those to ts_scripts/spellcheck_conf/wordlist.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.