From 27873e5c4720449b81f52d649d6d6ea9ef558deb Mon Sep 17 00:00:00 2001 From: Pete Higgins Date: Mon, 4 May 2020 17:54:52 -0700 Subject: Add rake tasks for spellchecker. Signed-off-by: Pete Higgins --- Rakefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- cgit v1.2.1