diff --git a/tests/data/manifest.yml b/tests/data/manifest.yml index ef7abc8..d92252a 100644 --- a/tests/data/manifest.yml +++ b/tests/data/manifest.yml @@ -1,6 +1,6 @@ # Rules that are set for removal have not been included rules: - 000-US-spellcheck: # No value in a clean case for spelling + 000-US-spellcheck: cases: - id: misspell filetypes: [md, rst] @@ -12,6 +12,20 @@ rules: - wrod - someting severity: error + - id: ignore-rst + filetypes: [rst] + content: | + Ignore the :vale-ignore:`splelling` mistake. + expect: + triggers: [] + severity: error + - id: ignore-md + filetypes: [md] + content: | + Ignore the {vale-ignore}`splelling` mistake. + expect: + triggers: [] + severity: error 003-Ubuntu-names-versions: cases: - id: ubuntu-names-md diff --git a/vale.ini b/vale.ini index 72939ac..0bbf584 100644 --- a/vale.ini +++ b/vale.ini @@ -32,30 +32,32 @@ Canonical.025c-latinisms-to-avoid = suggestion Canonical.400-Enforce-inclusive-terms = error Canonical.500-Repeated-words = warning -TokenIgnores = ({vale-ignore}`.+?`), ({woke-ignore}`.+?`) [*.md] BasedOnStyles = Canonical +# Ignore custom spelling role +TokenIgnores = ({(vale-ignore|woke-ignore)}`.+?`) + # Ignore opening colon-fenced (:::) lines and colon-fenced literal directives # The listed directives must be in sync with the [*.rst] `BlockIgnores` BlockIgnores = (::::*[^\n]*), \ (?s)(::::*) *{(?:code-block|code|prompt|sourcecode|terminal|toctree)}[^\n]*\n(?:(?!\1$)[^\n]*\n)*\1 * + [*.rst] BasedOnStyles = Canonical -# inline literal roles +# Ignore custom spelling role +TokenIgnores = (:(vale-ignore|woke-ignore):`.+?`) +# Ignore technical roles TokenIgnores = (:relatedlinks:) TokenIgnores = (:(command|envvar|file|kbd|literal|literalref|math|option|program|regexp|samp|token)?:`.+?`) -TokenIgnores = (:vale-ignore|woke-ignore:`.+?`) - -# Directive names +# Ignore directives TokenIgnores = (.. \w+::) -# Directive options +# Ignore options TokenIgnores = (:\w+: \w+), (:\w+:) - -# links defined elsewhere +# Ignore external links TokenIgnores = (\`\w+\`_) # Spelling not respecting code blocks