Skip to content

Commit 53fbb82

Browse files
committed
Add streetsidesoftware.code-spell-checker extension
1 parent 693b090 commit 53fbb82

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.vscode/settings.json
2+
spelling_errors.json

cspell.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"allowCompoundWords": true,
5+
"enableFiletypes": [],
6+
"ignorePaths": [
7+
"cspell.json"
8+
],
9+
// FlagWords allows you to specify a list of words that will always be considered incorrect. Useful for words that are commonly misspelled.
10+
"flagWords": [],
11+
// Ignore allows you the specify a list of words you want to ignore.
12+
"ignoreWords": [],
13+
// The words list allows you to add words that will be considered correct and will be used as suggestions.
14+
// Feel free to add newly introduced words to the list
15+
"words": [
16+
]
17+
}

spellcheck.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# When editing this file, please check whether the changes also need to be applied to the LinuxGSM and LinuxGSM-Dev-Docs repositories.
4+
5+
# Temporary file for cspell output
6+
tempFile=$(mktemp)
7+
8+
# Run cspell on all files and capture the output
9+
cspell "**" > "$tempFile" 2>&1
10+
11+
# Process the output to extract unique words and save them to spelling_errors.json
12+
# This assumes that the spelling errors are identifiable in a specific format from cspell output
13+
grep "Unknown word" "$tempFile" | grep -oP "\(\K[^\)]+" | sort -u | jq -R . | jq -s . > spelling_errors.json
14+
15+
# Cleanup
16+
rm "$tempFile"
17+
18+
echo "Spelling errors have been saved to spelling_errors.json"

0 commit comments

Comments
 (0)