From ee55f26c365ae9cfdc7633a5133ff30cef17aaa8 Mon Sep 17 00:00:00 2001 From: Lorna Jane Mitchell Date: Tue, 5 Mar 2024 11:28:11 +0000 Subject: [PATCH] docs: Fix a silent failure in the Vale rules, check CI can catch it (#1464) --- .../{Rules => Redocly-Docs}/BritishEnglish.yml | 0 .../{Rules => Redocly-Docs}/FutureTense.yml | 0 .../{Rules => Redocly-Docs}/HeaderGerunds.yml | 0 .../InclusionGenderCulture.yml | 0 .../{Rules => Redocly-Docs}/OxfordComma.yml | 0 .../{Rules => Redocly-Docs}/accept.txt | 0 .../{Rules => Redocly-Docs}/reject.txt | 0 .github/workflows/docs-tests.yaml | 1 + .vale.ini | 18 +++++++----------- docs/commands/lint.md | 2 +- 10 files changed, 9 insertions(+), 12 deletions(-) rename .github/styles/{Rules => Redocly-Docs}/BritishEnglish.yml (100%) rename .github/styles/{Rules => Redocly-Docs}/FutureTense.yml (100%) rename .github/styles/{Rules => Redocly-Docs}/HeaderGerunds.yml (100%) rename .github/styles/{Rules => Redocly-Docs}/InclusionGenderCulture.yml (100%) rename .github/styles/{Rules => Redocly-Docs}/OxfordComma.yml (100%) rename .github/styles/config/vocabularies/{Rules => Redocly-Docs}/accept.txt (100%) rename .github/styles/config/vocabularies/{Rules => Redocly-Docs}/reject.txt (100%) diff --git a/.github/styles/Rules/BritishEnglish.yml b/.github/styles/Redocly-Docs/BritishEnglish.yml similarity index 100% rename from .github/styles/Rules/BritishEnglish.yml rename to .github/styles/Redocly-Docs/BritishEnglish.yml diff --git a/.github/styles/Rules/FutureTense.yml b/.github/styles/Redocly-Docs/FutureTense.yml similarity index 100% rename from .github/styles/Rules/FutureTense.yml rename to .github/styles/Redocly-Docs/FutureTense.yml diff --git a/.github/styles/Rules/HeaderGerunds.yml b/.github/styles/Redocly-Docs/HeaderGerunds.yml similarity index 100% rename from .github/styles/Rules/HeaderGerunds.yml rename to .github/styles/Redocly-Docs/HeaderGerunds.yml diff --git a/.github/styles/Rules/InclusionGenderCulture.yml b/.github/styles/Redocly-Docs/InclusionGenderCulture.yml similarity index 100% rename from .github/styles/Rules/InclusionGenderCulture.yml rename to .github/styles/Redocly-Docs/InclusionGenderCulture.yml diff --git a/.github/styles/Rules/OxfordComma.yml b/.github/styles/Redocly-Docs/OxfordComma.yml similarity index 100% rename from .github/styles/Rules/OxfordComma.yml rename to .github/styles/Redocly-Docs/OxfordComma.yml diff --git a/.github/styles/config/vocabularies/Rules/accept.txt b/.github/styles/config/vocabularies/Redocly-Docs/accept.txt similarity index 100% rename from .github/styles/config/vocabularies/Rules/accept.txt rename to .github/styles/config/vocabularies/Redocly-Docs/accept.txt diff --git a/.github/styles/config/vocabularies/Rules/reject.txt b/.github/styles/config/vocabularies/Redocly-Docs/reject.txt similarity index 100% rename from .github/styles/config/vocabularies/Rules/reject.txt rename to .github/styles/config/vocabularies/Redocly-Docs/reject.txt diff --git a/.github/workflows/docs-tests.yaml b/.github/workflows/docs-tests.yaml index 2b40636b..ea1fef7f 100644 --- a/.github/workflows/docs-tests.yaml +++ b/.github/workflows/docs-tests.yaml @@ -24,6 +24,7 @@ jobs: with: files: '["README.md", "docs"]' filter_mode: file + fail_on_error: true linkcheck: runs-on: ubuntu-latest diff --git a/.vale.ini b/.vale.ini index 5f29d079..15d4698d 100644 --- a/.vale.ini +++ b/.vale.ini @@ -2,13 +2,13 @@ # See: https://docs.errata.ai/vale/config # The relative path to the folder containing linting rules (styles). -StylesPath = .github/styles +StylesPath = ".github/styles" # Vocab define the exceptions to use in *all* `BasedOnStyles`. # spelling-exceptions.txt triggers `Vale.Terms` # reject.txt triggers `Vale.Avoid` # See: https://docs.errata.ai/vale/vocab -Vocab = Rules +Vocab = Redocly-Docs # Minimum alert level # ------------------- @@ -19,10 +19,10 @@ MinAlertLevel = suggestion # IgnoredScopes specifies inline-level HTML tags to ignore. # These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still won't raise any alerts. # Default: ignore `code` and `tt`. -IgnoredScopes = code, tt, img, url, a, body.id +IgnoredScopes = code, tt, img, url + # SkippedScopes specifies block-level HTML tags to ignore. Ignore any content in these scopes. # Default: ignore `script`, `style`, `pre`, and `figure`. -# For AsciiDoc: by default, listingblock, and literalblock. SkippedScopes = script, style, pre, figure, code, tt, listingblock, literalblock # Rules for matching file types. See: https://docs.errata.ai/vale/scoping @@ -34,13 +34,9 @@ mdx = md # Rules for .MD, .MDX [*.{md,mdx}] -BasedOnStyles = Rules -# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs. -TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[) -Vale.Repetition = NO -Vale.SentenceSpacing = NO -Vale.Spelling = NO - +BasedOnStyles = Redocly-Docs +# Ignore code surrounded by backticks +TokenIgnores = (\x60[^\n\x60]+\x60) # /End of rules for .MD, .MDX diff --git a/docs/commands/lint.md b/docs/commands/lint.md index 6f682e28..5829fe58 100644 --- a/docs/commands/lint.md +++ b/docs/commands/lint.md @@ -109,7 +109,7 @@ Some formats, such as CheckStyle or JSON, don't work well when mulitple APIs are #### Codeframe (default) -The command `redocly lint --format=codeframe` lints the file and uses the default format of `codeframe`. You will see the same output as below if you omit the `--format` parameter. +The command `redocly lint --format=codeframe` lints the file and uses the default format of `codeframe`. It produces the same output as below if you omit the `--format` parameter. ```bash [1] museum-with-errors.yaml:19:7 at #/paths/~1museum-hours/get/operationIds