Skip to content

Commit 12e2bcf

Browse files
authored
Add script to scan cspell ignore lists (open-telemetry#3629)
1 parent 6e2650a commit 12e2bcf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/cspell-ignore-scanner

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
#
3+
# 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
4+
# This helps to add new words to the .vscode/cspell.json file
5+
#
6+
7+
DIRECTORY=${1:-.}
8+
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

0 commit comments

Comments
 (0)