Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions fixtures/typos/good/Clean.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,21 @@ This sentence is spelled correctly and should pass the spell checker.

A separate concern is handled here, and the receipt is acknowledged.

Each block below plants a real misspelling that typos would normally flag, then
silences it with one of the four blessed ignore directives. The whole fixture
must still exit 0; if any directive stopped working, the planted misspelling
would surface and fail this fixture.

teh # spellchecker:disable-line

# spellchecker:ignore-next-line
recieve

# spellchecker:off
seperate
occured
# spellchecker:on

<!-- spellchecker:off -->
definately
<!-- spellchecker:on -->
8 changes: 5 additions & 3 deletions modules/typos/typos.test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
# Tests the typos module: the spell-checker passes the good fixture (including
# an inline `spellchecker:disable-line` directive) and flags the bad fixture.
# Skips cleanly when the engine is absent.
# Tests the typos module: the spell-checker passes the good fixture and flags
# the bad fixture. The good fixture plants a real misspelling under each of the
# four blessed ignore directives (disable-line, ignore-next-line, the comment
# block, and the HTML-comment block), so a good->exit-0 result conjunctively
# proves every directive form still suppresses. Skips when the engine is absent.
set -uo pipefail
# shellcheck source=harness/shell/lib.sh
source "$(git rev-parse --show-toplevel)/harness/shell/lib.sh"
Expand Down