Skip to content

Commit

Permalink
fix(cspell): sort and uniq ignore lists
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Sep 28, 2024
1 parent a5e089d commit f6827ca
Show file tree
Hide file tree
Showing 7 changed files with 409 additions and 318 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/auto-cleanup-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
yarn content fix-flaws
yarn fix:md
yarn fix:fm
node scripts/sort_and_unique_file_lines.js .vscode/ignore-list.txt
node scripts/sort_and_unique_file_lines.js .vscode/terms-abbreviations.txt
- name: Create PR with only fixable issues
if: success()
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/pr-check_cspell_lists.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check cSpell lists

on:
pull_request:
branches:
- main
paths:
- .vscode/ignore-list.txt
- .vscode/terms-abbreviations.txt

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout-cone-mode: false
sparse-checkout: |
.vscode/ignore-list.txt
.vscode/terms-abbreviations.txt
.nvmrc
package.json
scripts/sort_and_unique_file_lines.js
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Check if cSpell word lists are in correct order
run: |
node scripts/sort_and_unique_file_lines.js .vscode/ignore-list.txt --check
node scripts/sort_and_unique_file_lines.js .vscode/terms-abbreviations.txt --check
2 changes: 1 addition & 1 deletion .github/workflows/spelling-check-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TITLE: Weekly spelling check
LABELS: reported by automation,good first issue
LABELS: reported by automation
BODY: |
Typos and unknown words:
Expand Down
6 changes: 6 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ export default {
`yarn filecheck ${filenames.join(" ")}`,
],
"*": (filenames) => [`node scripts/log-url-issues.js`],
".vscode/ignore-list.txt": (filenames) => [
`node scripts/sort_and_unique_file_lines.js .vscode/ignore-list.txt`,
],
".vscode/terms-abbreviations.txt": (filenames) => [
`node scripts/sort_and_unique_file_lines.js .vscode/terms-abbreviations.txt`,
],
};
Loading

0 comments on commit f6827ca

Please sign in to comment.