summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-06-09 19:02:04 -0700
committerGitHub <noreply@github.com>2020-06-09 19:02:04 -0700
commit4be3d8d01e9b757444d8e374ac0a541a68f75dab (patch)
tree281ec281fc8c83befab4ea6bb72252df79e446a6
parentcbc776de43ebfb3a2cf4a29cf41cc80782a9e80a (diff)
parentfb77309aecf220909bf4117219cb741c32120c07 (diff)
downloadchef-4be3d8d01e9b757444d8e374ac0a541a68f75dab.tar.gz
Merge pull request #9969 from chef/fail-early-with-cspell-syntax-error
Nicer error for misconfigured spellcheck in CI
-rw-r--r--.expeditor/verify_public.pipeline.yml3
-rw-r--r--Rakefile4
2 files changed, 4 insertions, 3 deletions
diff --git a/.expeditor/verify_public.pipeline.yml b/.expeditor/verify_public.pipeline.yml
index b88e92a6bc..ae750546f0 100644
--- a/.expeditor/verify_public.pipeline.yml
+++ b/.expeditor/verify_public.pipeline.yml
@@ -574,8 +574,9 @@ steps:
- label: "Spellcheck"
commands:
+ - ruby -rjson -e "JSON.parse(File.read('cspell.json'))" 2>/dev/null || (echo "Failed to parse config file 'cspell.json', skipping spellcheck" && exit 1)
- npm install -g cspell
- - cspell "**/*" "*.md"
+ - cspell "**/*"
expeditor:
executor:
docker:
diff --git a/Rakefile b/Rakefile
index fde45aa46c..2949b31cb7 100644
--- a/Rakefile
+++ b/Rakefile
@@ -111,12 +111,12 @@ end
namespace :spellcheck do
task :run do
- sh 'cspell "**/*" "*.md"'
+ sh 'cspell "**/*"'
end
desc "List the unique unrecognized words in the project."
task :unknown_words do
- sh 'cspell "**/*" "*.md" --wordsOnly --no-summary | sort | uniq'
+ sh 'cspell "**/*" --wordsOnly --no-summary | sort | uniq'
end
end