Add script to scan cspell ignore lists (#3629)

This commit is contained in:
Severin Neumann 2023-12-04 11:03:37 +01:00 committed by GitHub
parent 6e2650a147
commit 12e2bcf1f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

8
scripts/cspell-ignore-scanner Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
#
# This script scans directories content, layouts, data for files with "cSpell:ignore" in them and then prints how often a certain word has been added to an ignore list
# This helps to add new words to the .vscode/cspell.json file
#
DIRECTORY=${1:-.}
grep "cSpell:ignore" content layouts data -Ri ${DIRECTORY} | awk -F"cSpell:ignore" '{ print $2; }' | sed 's/^://; s/^[ \t]*//; s/[*\/}>-]//g'| tr ' ' '\n' | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -n