From e0d1293fac897350fb3c7b01f91c9b92df12e9cb Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Thu, 5 Dec 2024 12:28:27 +0100 Subject: [PATCH] ci: add instructions that explain how to fix spellcheck errors (#7016) --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f010e40b5..3718cfa1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1102,6 +1102,22 @@ jobs: false } - name: Run cargo-spellcheck - run: cargo spellcheck --code 1 + run: | + if ! cargo spellcheck --code 1 + then + echo '' + echo '' + echo 'If this is a Rust method/type/variable name, then you should' + echo 'enclose it in backticks like this: `MyRustType`.' + echo '' + echo 'If this is a real word, then you can add it to spellcheck.dic' + exit 1 + fi - name: Detect trailing whitespace - run: if grep --exclude-dir=.git --exclude-dir=target -re '\s$' . ; then exit 1; fi + run: | + if grep --exclude-dir=.git --exclude-dir=target -rne '\s$' . + then + echo '' + echo 'Please remove trailing whitespace from these lines.' + exit 1 + fi