summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-05-04 17:54:52 -0700
committerTim Smith <tsmith84@gmail.com>2020-05-18 20:29:40 -0700
commit27873e5c4720449b81f52d649d6d6ea9ef558deb (patch)
tree1e1e9f939e0b2e208722dc9b42e4d0025f652664 /Rakefile
parentcfb8eafc4e295a1abe5b194a4a06510b3d450049 (diff)
downloadchef-27873e5c4720449b81f52d649d6d6ea9ef558deb.tar.gz
Add rake tasks for spellchecker.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 56a2138766..eb39315645 100644
--- a/Rakefile
+++ b/Rakefile
@@ -108,3 +108,19 @@ begin
rescue LoadError
puts "yard is not available. bundle install first to make sure all dependencies are installed."
end
+
+if `command -v cspell`.empty?
+ puts "cspell is not available. Run `npm install -g cspell` to make it available."
+else
+ namespace :spellcheck do
+ task :run do
+ sh 'cspell **/* *.md'
+ end
+
+ task :unknown_words do
+ sh 'cspell **/* *.md --wordsOnly --no-summary | sort | uniq'
+ end
+ end
+
+ task spellcheck: 'spellcheck:run'
+end