diff --git a/.github/vale/styles/OpenSearch/HeadingAcronyms.yml b/.github/vale/styles/OpenSearch/HeadingAcronyms.yml deleted file mode 100644 index 726096410..000000000 --- a/.github/vale/styles/OpenSearch/HeadingAcronyms.yml +++ /dev/null @@ -1,11 +0,0 @@ -extends: existence -message: "'%s': Don't define acronyms in headings." -link: 'https://github.com/opensearch-project/documentation-website/blob/main/STYLE_GUIDE.md#acronyms' -level: error -ignorecase: false -scope: heading -nonword: true -action: - name: remove -tokens: - - '\([A-Z]{2,5}\)' diff --git a/.github/vale/styles/OpenSearch/HeadingCapitalization.yml b/.github/vale/styles/OpenSearch/HeadingCapitalization.yml deleted file mode 100644 index efa5a5c34..000000000 --- a/.github/vale/styles/OpenSearch/HeadingCapitalization.yml +++ /dev/null @@ -1,13 +0,0 @@ -extends: capitalization -message: "'%s' is a heading and should be in sentence case." -level: error -scope: heading -match: $sentence -indicators: - - ) - - . - - ':' -exceptions: - - '([A-Z][a-z0-9]+){2,}' # ignores all camel case words - - '[A-Z]{2,}' # ignores all acronyms - - k # ignores lowercase k-NN \ No newline at end of file diff --git a/.github/vale/styles/OpenSearch/HeadingColon.yml b/.github/vale/styles/OpenSearch/HeadingColon.yml deleted file mode 100644 index f20ef5869..000000000 --- a/.github/vale/styles/OpenSearch/HeadingColon.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Capitalize the word after a colon in '%s'." -nonword: true -level: error -scope: heading -tokens: - - '(?::\s)[a-z]+' diff --git a/.github/vale/styles/OpenSearch/HeadingPunctuation.yml b/.github/vale/styles/OpenSearch/HeadingPunctuation.yml deleted file mode 100644 index 451284dde..000000000 --- a/.github/vale/styles/OpenSearch/HeadingPunctuation.yml +++ /dev/null @@ -1,9 +0,0 @@ -extends: existence -message: "Don't use punctuation at the end of a heading." -nonword: true -level: error -scope: heading -action: - name: remove -tokens: - - '[.?!]$' diff --git a/.github/vale/styles/OpenSearch/LinksDoubleParentheses.yml b/.github/vale/styles/OpenSearch/LinksDoubleParentheses.yml deleted file mode 100644 index bc4f3aed0..000000000 --- a/.github/vale/styles/OpenSearch/LinksDoubleParentheses.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "Remove double parentheses from the link '%s'." -level: error -nonword: true -scope: raw -tokens: - - '\]\({2,}[^)]*?\){1,}' - \ No newline at end of file diff --git a/.github/vale/styles/OpenSearch/LinksDoubleSlash.yml b/.github/vale/styles/OpenSearch/LinksDoubleSlash.yml deleted file mode 100644 index 528fb73ab..000000000 --- a/.github/vale/styles/OpenSearch/LinksDoubleSlash.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Remove double slashes from the link '%s'." -level: error -nonword: true -scope: raw -tokens: - - '\(\{\{site.url\}\}\{\{site.baseurl\}\}[^)]*?\/{2,}[^)]*?\)' diff --git a/.github/vale/styles/OpenSearch/LinksEndSlash.yml b/.github/vale/styles/OpenSearch/LinksEndSlash.yml deleted file mode 100644 index 1f20b36a1..000000000 --- a/.github/vale/styles/OpenSearch/LinksEndSlash.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Add a trailing slash to the link '%s'." -level: error -nonword: true -scope: raw -tokens: - - '\(\{\{site.url\}\}\{\{site.baseurl\}\}(\/[A-Za-z0-9-_]+)+\s*\)' diff --git a/.github/vale/styles/OpenSearch/LinksMidSlash.yml b/.github/vale/styles/OpenSearch/LinksMidSlash.yml deleted file mode 100644 index 7ab9e9d07..000000000 --- a/.github/vale/styles/OpenSearch/LinksMidSlash.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Add a slash after '{{site.url}}/{{site.baseurl}}' in '%s'." -level: error -nonword: true -scope: raw -tokens: - - '\(\{\{site.url\}\}\{\{site.baseurl\}\}([^\/])(?:(.*))?\)' diff --git a/.github/vale/styles/OpenSearch/MergeConflicts.yml b/.github/vale/styles/OpenSearch/MergeConflicts.yml deleted file mode 100644 index f76918bbd..000000000 --- a/.github/vale/styles/OpenSearch/MergeConflicts.yml +++ /dev/null @@ -1,6 +0,0 @@ -extends: existence -message: Resolve lingering merge conflicts. -nonword: true -level: error -tokens: - - <<<<<<< HEAD \ No newline at end of file diff --git a/.github/vale/styles/OpenSearch/StackedHeadings.yml b/.github/vale/styles/OpenSearch/StackedHeadings.yml deleted file mode 100644 index ac7dd72c4..000000000 --- a/.github/vale/styles/OpenSearch/StackedHeadings.yml +++ /dev/null @@ -1,24 +0,0 @@ -extends: script -message: Do not stack headings. Insert an introductory sentence between headings. -level: error -link: https://github.com/opensearch-project/documentation-website/blob/main/STYLE_GUIDE.md#formatting-and-organization -scope: raw -script: | - text := import("text") - matches := [] - // Replace code blocks with dummy text to avoid processing comments - document := text.re_replace("(?s) *(```.*?```)", scope, "text") - isHeading := false - for line in text.split(document, "\n") { - if text.trim_space(line) != "" { - if text.has_prefix(line, "#") { - if isHeading == true { - start := text.index(scope, line) - matches = append(matches, {begin: start, end: start + len(line)}) - } - isHeading = true // new section; reset count - } else { - isHeading = false - } - } - } diff --git a/.github/vale/styles/OpenSearch/TableHeadings.yml b/.github/vale/styles/OpenSearch/TableHeadings.yml deleted file mode 100644 index 96cb8621f..000000000 --- a/.github/vale/styles/OpenSearch/TableHeadings.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: capitalization -message: "'%s' is a table heading and should be in sentence case." -level: error -scope: table.header -match: $sentence -exceptions: - - k # ignores lowercase k-NN diff --git a/.vale.ini b/.vale.ini index 075aa57d8..6e3ed73c7 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,20 +1,10 @@ StylesPath = ".github/vale/styles" Vocab = "OpenSearch" MinAlertLevel = warning -SkippedScopes = code, style [*] BasedOnStyles = Vale, OpenSearch - -BlockIgnores = {%-?\s*comment[.|\s|\S]*?endcomment\s*-?%}, \ - {%\s*raw[.|\s|\S]*?endraw\s*%}, \ - {:+\s*[\.\w-\s]*\s*}, \ - {%\s+[^%]*%} - -# ignore variables -TokenIgnores = [a-zA-Z_]+((?:_|\.)[a-zA-Z]+)+ - -# override Vale spelling + Vale.Spelling = NO Vale.Repetition = NO Vale.Terms = YES @@ -28,22 +18,13 @@ OpenSearch.Exclamation = YES OpenSearch.FailoverNoun = YES OpenSearch.FailoverVerb = YES OpenSearch.FutureTense = NO -OpenSearch.HeadingAcronyms = YES -OpenSearch.HeadingCapitalization = YES -OpenSearch.HeadingColon = YES -OpenSearch.HeadingPunctuation = YES OpenSearch.Inclusive = YES OpenSearch.LatinismsElimination = YES OpenSearch.LatinismsSubstitution = YES -OpenSearch.LinksDoubleParentheses = YES -OpenSearch.LinksDoubleSlash = YES -OpenSearch.LinksEndSlash = YES -OpenSearch.LinksMidSlash = YES OpenSearch.LoginNoun = YES OpenSearch.LoginVerb = YES OpenSearch.LogoutNoun = YES OpenSearch.LogoutVerb = YES -OpenSearch.MergeConflicts = YES OpenSearch.OxfordComma = YES OpenSearch.PassiveVoice = NO OpenSearch.Please = YES @@ -59,10 +40,8 @@ OpenSearch.SpacingPunctuation = YES OpenSearch.SpacingSlash = YES OpenSearch.SpacingWords = YES OpenSearch.Spelling = YES -OpenSearch.StackedHeadings = YES OpenSearch.SubstitutionsError = YES OpenSearch.SubstitutionsSuggestion = YES -OpenSearch.TableHeadings = YES OpenSearch.TimeoutNoun = YES OpenSearch.TimeoutVerb = YES OpenSearch.UnitsNames = YES