Skip to content

Commit

Permalink
Ignore symlinks from spell checks (FreeRTOS#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
leegeth authored Apr 8, 2021
1 parent bd7a7ac commit 5815a9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spellings/tools/find-unknown-comment-words
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ fi

TMPFILE=${0##*/}-$USER-$RANDOM
unknowns=( "not-used" ) # get around empty array with nounset
extract-comments `find $DIRNAME \( -iname \*.[ch] -o -iname \*.dox \)` |
# Symlinks will be ignored in this spell check. `-type f` switch in `find` command will ignore symlinks.
extract-comments `find $DIRNAME \( -iname \*.[ch] -o -iname \*.dox \) -type f` |
tr [:upper:] [:lower:] |
grep -o -E '[a-zA-Z]+' |
ablexicon -l $LEXICON > $TMPFILE
Expand All @@ -103,7 +104,8 @@ do
continue
fi

for file in `find $DIRNAME \( -iname \*.[ch] -o -iname \*.dox \)`
# Symlinks will be ignored in this spell check. `-type f` switch in `find` command will ignore symlinks.
for file in `find $DIRNAME \( -iname \*.[ch] -o -iname \*.dox \) -type f`
do
if [[ $file == *"third_party"* || $file == *"CMock"* ]]
then
Expand Down

0 comments on commit 5815a9b

Please sign in to comment.