Skip to content

Commit

Permalink
Add lightning spell check
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift authored and rustyrussell committed Jan 26, 2018
1 parent 2c17546 commit 3e40a48
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ check-whitespace: check-whitespace/Makefile check-whitespace/tools/check-bolt.c
check-markdown:
@tools/check-markdown.sh

check-source: check-makefile check-source-bolt check-whitespace check-markdown
check-spelling:
@tools/check-spelling.sh

check-source: check-makefile check-source-bolt check-whitespace check-markdown check-spelling

full-check: check check-source

Expand Down
8 changes: 8 additions & 0 deletions tools/check-spelling.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

git grep -iE 'l[ightn]{6}g|l[ightn]{8}g|ilghtning|lgihtning|lihgtning|ligthning|lighnting|lightinng|lightnnig|lightnign' -- . ':!tools/check-spelling.sh'
if [[ $? == 0 ]]; then
echo "Identified a likely misspelling of the word \"lightning\" (see above). Please fix."
echo "Is this warning incorrect? Please teach tools/check-spelling.sh about the exciting new word."
exit 1
fi

0 comments on commit 3e40a48

Please sign in to comment.