From e636ad8bd1fe1379d3ffd45342748454dbabbed5 Mon Sep 17 00:00:00 2001 From: Samuel Tschiedel <431708+aisamu@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:44:42 -0300 Subject: [PATCH 01/12] feat: add clojure support (#649) --- internal/core/format.go | 6 ++++++ internal/lint/comments.go | 7 +++++++ testdata/features/lint.feature | 11 +++++++++++ testdata/fixtures/formats/test.clj | 9 +++++++++ 4 files changed, 33 insertions(+) create mode 100644 testdata/fixtures/formats/test.clj diff --git a/internal/core/format.go b/internal/core/format.go index 993a8583..65f4c532 100755 --- a/internal/core/format.go +++ b/internal/core/format.go @@ -17,6 +17,11 @@ var CommentsByNormedExt = map[string]map[string]string{ "blockStart": `(/\*.*)`, "blockEnd": `(.*\*/)`, }, + ".clj": { + "inline": `(;+.+)`, + "blockStart": `$^`, + "blockEnd": `$^`, + }, ".css": { "inline": `(/\*.+\*/)`, "blockStart": `(/\*.*)`, @@ -71,6 +76,7 @@ var FormatByExtension = map[string][]string{ `\.(?:adoc|asciidoc|asc)$`: {".adoc", "markup"}, `\.(?:cpp|cc|c|cp|cxx|c\+\+|h|hpp|h\+\+)$`: {".c", "code"}, `\.(?:cs|csx)$`: {".c", "code"}, + `\.(?:clj|cljs|cljc|cljd)$`: {".clj", "code"}, `\.(?:css)$`: {".css", "code"}, `\.(?:go)$`: {".c", "code"}, `\.(?:html|htm|shtml|xhtml)$`: {".html", "markup"}, diff --git a/internal/lint/comments.go b/internal/lint/comments.go index 1dbf44e3..af5ded58 100644 --- a/internal/lint/comments.go +++ b/internal/lint/comments.go @@ -30,6 +30,13 @@ var patterns = map[string]map[string][]*regexp.Regexp{ regexp.MustCompile(`(.*\*/)`), }, }, + ".clj": { + "inline": []*regexp.Regexp{ + regexp.MustCompile(`(?s);+(.+)`), + }, + "blockStart": []*regexp.Regexp{}, + "blockEnd": []*regexp.Regexp{}, + }, ".css": { "inline": []*regexp.Regexp{ regexp.MustCompile(`(?s)/\*(.+)\*/`), diff --git a/testdata/features/lint.feature b/testdata/features/lint.feature index 99501a3f..3ac37d8f 100755 --- a/testdata/features/lint.feature +++ b/testdata/features/lint.feature @@ -146,6 +146,17 @@ Feature: Lint """ And the exit status should be 0 + Scenario: Lint a Clojure file + When I lint "test.clj" + Then the output should contain exactly: + """ + test.clj:3:6:vale.Annotations:'NOTE' left in text + test.clj:5:15:vale.Annotations:'TODO' left in text + test.clj:7:6:vale.Annotations:'FIXME' left in text + test.clj:9:11:vale.Annotations:'XXX' left in text + """ + And the exit status should be 0 + Scenario: Lint a JSX file When I lint "test.jsx" Then the output should contain exactly: diff --git a/testdata/fixtures/formats/test.clj b/testdata/fixtures/formats/test.clj new file mode 100644 index 00000000..be482b45 --- /dev/null +++ b/testdata/fixtures/formats/test.clj @@ -0,0 +1,9 @@ +(ns test) + +;;;; NOTE: Section comment + +(defn TODO ;; TODO: double ;; comment + "FIXME: Unfortunately no linting for docstrings" + ;; FIXME: But linting for comments! + [] + 'XXX) ; XXX: single ; comment From 545983ee435bc49b84d4500ff72821508aa40e13 Mon Sep 17 00:00:00 2001 From: jdkato Date: Wed, 21 Jun 2023 13:49:51 -0700 Subject: [PATCH 02/12] fix: update GitLab CI --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca3e85d8..afe30aa9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ test: - apt-get install -y curl gnupg build-essential default-jre - apt-get install -y xsltproc zip unzip python3-pip ruby-full - - pip install sphinx + - apt install -y python3-sphinx - gem install asciidoctor bundler - wget https://github.com/dita-ot/dita-ot/releases/download/3.6/dita-ot-3.6.zip From 27fe2f6031d185891faf6ea68ba6da4535689367 Mon Sep 17 00:00:00 2001 From: Lander Visterin <34447895+lanvstn@users.noreply.github.com> Date: Tue, 4 Jul 2023 19:36:04 +0200 Subject: [PATCH 03/12] fix: normalizePath tilde expansion on Windows (#656) normalizePath sometimes gets backslash paths as input. In such case it will not be able to act on the ~/ prefix, since it will be \~ instead. FromSlash will provide the correct variant. Co-authored-by: Lander Visterin --- internal/core/util.go | 2 +- internal/core/util_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/core/util.go b/internal/core/util.go index 1ef4ce61..e497a8f2 100755 --- a/internal/core/util.go +++ b/internal/core/util.go @@ -233,7 +233,7 @@ func normalizePath(path string) string { } if path == "~" { return homedir - } else if strings.HasPrefix(path, "~/") { + } else if strings.HasPrefix(path, filepath.FromSlash("~/")) { path = filepath.Join(homedir, path[2:]) } return path diff --git a/internal/core/util_test.go b/internal/core/util_test.go index ca1169f5..1da71e9e 100755 --- a/internal/core/util_test.go +++ b/internal/core/util_test.go @@ -55,7 +55,7 @@ func TestNormalizePath(t *testing.T) { t.Log("os.UserHomeDir failed, will not proceed with tests") return } - stylesPathInput := "~/.vale" + stylesPathInput := filepath.FromSlash("~/.vale") expectedOutput := filepath.Join(homedir, ".vale") result := normalizePath(stylesPathInput) if result != expectedOutput { From cc592450724e36d4d397b8716350f6df76955fb6 Mon Sep 17 00:00:00 2001 From: jdkato Date: Tue, 4 Jul 2023 10:48:16 -0700 Subject: [PATCH 04/12] feat: support `VALE_CONFIG_PATH` --- internal/core/ini.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/core/ini.go b/internal/core/ini.go index 432becf4..bdc05d81 100644 --- a/internal/core/ini.go +++ b/internal/core/ini.go @@ -178,6 +178,7 @@ func loadINI(cfg *Config, dry bool) error { } } + fromEnv, hasEnv := os.LookupEnv("VALE_CONFIG_PATH") if cfg.Flags.Sources != "" { // We have multiple sources -- e.g., local config + remote package(s). // @@ -194,6 +195,13 @@ func loadINI(cfg *Config, dry bool) error { return NewE100("invalid --config", err) } cfg.Root = filepath.Dir(cfg.Flags.Path) + } else if hasEnv { + // We've been given a value through `VALE_CONFIG_PATH`. + uCfg, err = shadowLoad(fromEnv) + if err != nil { + return NewE100("invalid VALE_CONFIG_PATH", err) + } + cfg.Root = filepath.Dir(fromEnv) } else { // We're using a config file found using a local search process. uCfg, err = shadowLoad(base) From f7b661282257d8d7e3559b0a0bc1465092ca1705 Mon Sep 17 00:00:00 2001 From: jdkato Date: Tue, 4 Jul 2023 10:58:59 -0700 Subject: [PATCH 05/12] fix: set base path for `VALE_CONFIG_PATH` --- internal/core/ini.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/core/ini.go b/internal/core/ini.go index bdc05d81..b640ff34 100644 --- a/internal/core/ini.go +++ b/internal/core/ini.go @@ -202,6 +202,7 @@ func loadINI(cfg *Config, dry bool) error { return NewE100("invalid VALE_CONFIG_PATH", err) } cfg.Root = filepath.Dir(fromEnv) + cfg.Flags.Path = fromEnv } else { // We're using a config file found using a local search process. uCfg, err = shadowLoad(base) From 917469633db3711972b4eb2626f9fe76a923a4ce Mon Sep 17 00:00:00 2001 From: jdkato Date: Tue, 4 Jul 2023 11:12:58 -0700 Subject: [PATCH 06/12] chore: GoReleaser version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c65c4ea..052fe221 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: uses: goreleaser/goreleaser-action@v4 if: startsWith(github.ref, 'refs/tags/') with: - version: latest + version: v1.18.2 args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 65b5b7b37c6e34e94a6bd193656cf725b9ba75c8 Mon Sep 17 00:00:00 2001 From: jdkato Date: Thu, 6 Jul 2023 12:43:07 -0700 Subject: [PATCH 07/12] refactor: validate `scope` --- internal/check/capitalization.go | 5 +++++ internal/check/conditional.go | 5 +++++ internal/check/consistency.go | 5 +++++ internal/check/definition.go | 19 +++++++++++++++++++ internal/check/existence.go | 5 +++++ internal/check/occurrence.go | 5 +++++ internal/check/repetition.go | 5 +++++ internal/check/scope.go | 23 +++++++++++++++++++++++ internal/check/sequence.go | 5 +++++ internal/check/substitution.go | 5 +++++ 10 files changed, 82 insertions(+) diff --git a/internal/check/capitalization.go b/internal/check/capitalization.go index 2cbcf319..51dd4ea3 100644 --- a/internal/check/capitalization.go +++ b/internal/check/capitalization.go @@ -40,6 +40,11 @@ func NewCapitalization(cfg *core.Config, generic baseCheck, path string) (Capita return rule, readStructureError(err, path) } + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } + re, err := updateExceptions(rule.Exceptions, cfg.AcceptedTokens) if err != nil { return rule, core.NewE201FromPosition(err.Error(), path, 1) diff --git a/internal/check/conditional.go b/internal/check/conditional.go index 1a460d5d..be29c64b 100644 --- a/internal/check/conditional.go +++ b/internal/check/conditional.go @@ -27,6 +27,11 @@ func NewConditional(cfg *core.Config, generic baseCheck, path string) (Condition return rule, readStructureError(err, path) } + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } + re, err := updateExceptions(rule.Exceptions, cfg.AcceptedTokens) if err != nil { return rule, core.NewE201FromPosition(err.Error(), path, 1) diff --git a/internal/check/consistency.go b/internal/check/consistency.go index 8d38c7ed..9f0a34b0 100644 --- a/internal/check/consistency.go +++ b/internal/check/consistency.go @@ -40,6 +40,11 @@ func NewConsistency(cfg *core.Config, generic baseCheck, path string) (Consisten return rule, readStructureError(err, path) } + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } + regex := makeRegexp( cfg.WordTemplate, rule.Ignorecase, diff --git a/internal/check/definition.go b/internal/check/definition.go index 271b28c9..e4b0640f 100755 --- a/internal/check/definition.go +++ b/internal/check/definition.go @@ -357,3 +357,22 @@ func decodeRule(input interface{}, output interface{}) error { return decoder.Decode(input) } + +func checkScopes(scopes []string, path string) error { + for _, scope := range scopes { + // Negation ... + scope = strings.TrimPrefix(scope, "~") + + // Specification ... + // + // TODO: check sub-scopes too? + scope = strings.Split(scope, ".")[0] + if !core.StringInSlice(scope, allowedScopes) { + return core.NewE201FromTarget( + fmt.Sprintf("'scope' must be one of %v", allowedScopes), + "scope", + path) + } + } + return nil +} diff --git a/internal/check/existence.go b/internal/check/existence.go index 0c2bbc43..9cfad2b6 100644 --- a/internal/check/existence.go +++ b/internal/check/existence.go @@ -32,6 +32,11 @@ func NewExistence(cfg *core.Config, generic baseCheck, path string) (Existence, return rule, readStructureError(err, path) } + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } + re, err := updateExceptions(rule.Exceptions, cfg.AcceptedTokens) if err != nil { return rule, core.NewE201FromPosition(err.Error(), path, 1) diff --git a/internal/check/occurrence.go b/internal/check/occurrence.go index 01ae8ee6..1bad4c9f 100644 --- a/internal/check/occurrence.go +++ b/internal/check/occurrence.go @@ -25,6 +25,11 @@ func NewOccurrence(cfg *core.Config, generic baseCheck, path string) (Occurrence return rule, readStructureError(err, path) } + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } + regex := "" if rule.Ignorecase { regex += ignoreCase diff --git a/internal/check/repetition.go b/internal/check/repetition.go index 51a3a423..2d30dc20 100644 --- a/internal/check/repetition.go +++ b/internal/check/repetition.go @@ -27,6 +27,11 @@ func NewRepetition(cfg *core.Config, generic baseCheck, path string) (Repetition return rule, readStructureError(err, path) } + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } + regex := "" if rule.Ignorecase { regex += ignoreCase diff --git a/internal/check/scope.go b/internal/check/scope.go index 501feb44..520764b8 100644 --- a/internal/check/scope.go +++ b/internal/check/scope.go @@ -7,6 +7,29 @@ import ( "github.com/errata-ai/vale/v2/internal/nlp" ) +var allowedScopes = []string{ + "text", + "heading", + "heading.h1", + "heading.h2", + "heading.h3", + "heading.h4", + "heading.h5", + "heading.h6", + "table", + "table.header", + "table.cell", + "table.caption", + "figure.caption", + "list", + "paragraph", + "sentence", + "alt", + "blockquote", + "summary", + "raw", +} + // A Selector represents a named section of text. type Selector struct { Value []string // e.g., text.comment.line.py diff --git a/internal/check/sequence.go b/internal/check/sequence.go index 7fc0441a..98a11be1 100644 --- a/internal/check/sequence.go +++ b/internal/check/sequence.go @@ -47,6 +47,11 @@ func NewSequence(cfg *core.Config, generic baseCheck, path string) (Sequence, er return rule, readStructureError(err, path) } + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } + for i, token := range rule.Tokens { if !rule.needsTagging && token.Tag != "" { rule.needsTagging = true diff --git a/internal/check/substitution.go b/internal/check/substitution.go index 03adbe38..66615e6d 100644 --- a/internal/check/substitution.go +++ b/internal/check/substitution.go @@ -30,6 +30,11 @@ func NewSubstitution(cfg *core.Config, generic baseCheck, path string) (Substitu if err != nil { return rule, readStructureError(err, path) } + + err = checkScopes(rule.Scope, path) + if err != nil { + return rule, err + } tokens := "" re, err := updateExceptions(rule.Exceptions, cfg.AcceptedTokens) From 5df06933392ac43c665ac141c095089a8ef07b36 Mon Sep 17 00:00:00 2001 From: jdkato Date: Wed, 12 Jul 2023 15:18:12 -0700 Subject: [PATCH 08/12] test: fix inline scope cases --- internal/check/definition.go | 18 ++++++++++++++++-- internal/check/scope.go | 1 + testdata/features/scopes.feature | 2 ++ testdata/fixtures/scopes/rules/Strong.yml | 8 +++----- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/internal/check/definition.go b/internal/check/definition.go index e4b0640f..90bf6b95 100755 --- a/internal/check/definition.go +++ b/internal/check/definition.go @@ -15,6 +15,8 @@ import ( "gopkg.in/yaml.v2" ) +var inlineScopes = []string{"code", "link", "strong", "emphasis"} + // FilterEnv is the environment passed to the `--filter` flag. type FilterEnv struct { Rules []Definition @@ -360,6 +362,11 @@ func decodeRule(input interface{}, output interface{}) error { func checkScopes(scopes []string, path string) error { for _, scope := range scopes { + if strings.Contains(scope, "&") { + // FIXME: multi part ... + continue + } + // Negation ... scope = strings.TrimPrefix(scope, "~") @@ -367,12 +374,19 @@ func checkScopes(scopes []string, path string) error { // // TODO: check sub-scopes too? scope = strings.Split(scope, ".")[0] - if !core.StringInSlice(scope, allowedScopes) { + + if core.StringInSlice(scope, inlineScopes) { return core.NewE201FromTarget( - fmt.Sprintf("'scope' must be one of %v", allowedScopes), + fmt.Sprintf("scope '%v' is no longer supported; use 'raw' instead.", scope), + "scope", + path) + } else if !core.StringInSlice(scope, allowedScopes) { + return core.NewE201FromTarget( + fmt.Sprintf("'%v' is not a valid scope; must be one of %v", scope, allowedScopes), "scope", path) } } + return nil } diff --git a/internal/check/scope.go b/internal/check/scope.go index 520764b8..4c06e00d 100644 --- a/internal/check/scope.go +++ b/internal/check/scope.go @@ -25,6 +25,7 @@ var allowedScopes = []string{ "paragraph", "sentence", "alt", + "title", "blockquote", "summary", "raw", diff --git a/testdata/features/scopes.feature b/testdata/features/scopes.feature index f8aa376f..30658aae 100755 --- a/testdata/features/scopes.feature +++ b/testdata/features/scopes.feature @@ -66,6 +66,8 @@ Feature: Scopes test.md:3:19:rules.Code:'`XXX`' left in text test.md:5:34:rules.Link:Don't use '[here]' as the content of a link. test.md:7:56:rules.Link:Don't use '[here]' as the content of a link. + test.md:9:10:rules.Strong:'TODO' left in text + test.md:11:3:rules.Strong:'TODO' left in text test.md:13:6:rules.Code:'`XXX`' left in text test.md:15:1:rules.Code:'`XXX`' left in text """ diff --git a/testdata/fixtures/scopes/rules/Strong.yml b/testdata/fixtures/scopes/rules/Strong.yml index 3885e105..ccfb9b3e 100755 --- a/testdata/fixtures/scopes/rules/Strong.yml +++ b/testdata/fixtures/scopes/rules/Strong.yml @@ -2,9 +2,7 @@ message: "'%s' left in text" extends: existence ignorecase: false level: suggestion -scope: strong +nonword: true +scope: raw tokens: - - XXX - - FIXME - - TODO - - NOTE + - (?<=\*\*)(?:TODO|NOTE|FIXME|XXX)(?=\*\*) From e42027e42646405449b5496d97c7dd1501072b5c Mon Sep 17 00:00:00 2001 From: jdkato Date: Mon, 24 Jul 2023 13:02:43 -0700 Subject: [PATCH 09/12] fix: allow hypenated words in `Vale.Terms` --- internal/core/util.go | 2 +- testdata/features/misc.feature | 2 ++ testdata/fixtures/vocab/Basic/test.md | 4 ++++ testdata/fixtures/vocab/styles/Vocab/Basic/accept.txt | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/core/util.go b/internal/core/util.go index e497a8f2..61b25593 100755 --- a/internal/core/util.go +++ b/internal/core/util.go @@ -87,7 +87,7 @@ func IsLetter(s string) bool { // This is used to differentiate regex tokens from non-regex. func IsPhrase(s string) bool { for _, r := range s { - if !unicode.IsLetter(r) && r != ' ' && !unicode.IsDigit(r) { + if !unicode.IsLetter(r) && r != ' ' && !unicode.IsDigit(r) && r != '-' { return false } } diff --git a/testdata/features/misc.feature b/testdata/features/misc.feature index 6e17c06e..c84c93c9 100755 --- a/testdata/features/misc.feature +++ b/testdata/features/misc.feature @@ -8,6 +8,8 @@ Feature: Misc test.md:7:1:Vale.Terms:Use 'definately' instead of 'Definately'. test.md:13:1:Vale.Terms:Use 'Documentarians' instead of 'documentarians'. test.md:17:11:Vale.Terms:Use 'Log4j' instead of 'log4j'. + test.md:19:1:Vale.Terms:Use 'ABCDEF' instead of 'ABCDEf'. + test.md:21:1:Vale.Terms:Use 'ABC-DEF' instead of 'ABC-DEf'. """ Scenario: Multiple Vocabs diff --git a/testdata/fixtures/vocab/Basic/test.md b/testdata/fixtures/vocab/Basic/test.md index cfb629be..25c9f9ce 100755 --- a/testdata/fixtures/vocab/Basic/test.md +++ b/testdata/fixtures/vocab/Basic/test.md @@ -15,3 +15,7 @@ documentarians I matter-of-factly said no. I use the log4j library. + +ABCDEf + +ABC-DEf \ No newline at end of file diff --git a/testdata/fixtures/vocab/styles/Vocab/Basic/accept.txt b/testdata/fixtures/vocab/styles/Vocab/Basic/accept.txt index baaaeb4c..b5a8a3b0 100755 --- a/testdata/fixtures/vocab/styles/Vocab/Basic/accept.txt +++ b/testdata/fixtures/vocab/styles/Vocab/Basic/accept.txt @@ -3,3 +3,5 @@ definately # This is a comment Documentarians Log4j +ABCDEF +ABC-DEF From d95f702fc70d6d4311c34af345b6a0d8dd0cb65e Mon Sep 17 00:00:00 2001 From: jdkato Date: Mon, 24 Jul 2023 13:13:01 -0700 Subject: [PATCH 10/12] fix: ensure hypenated exceptions are respected --- internal/check/variables.go | 3 ++- testdata/fixtures/checks/Capitalization/.vale.ini | 3 +++ testdata/fixtures/checks/Capitalization/test3.md | 7 +++++++ testdata/fixtures/comments/_vale | 1 + testdata/fixtures/styles/demo/_vale | 1 + testdata/styles/Vocab/Cap/accept.txt | 3 +++ testdata/styles/demo/SentenceCaseAny.yml | 6 ++++++ 7 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 testdata/fixtures/checks/Capitalization/test3.md create mode 100644 testdata/styles/demo/SentenceCaseAny.yml diff --git a/internal/check/variables.go b/internal/check/variables.go index 210c2a55..37ce4f24 100755 --- a/internal/check/variables.go +++ b/internal/check/variables.go @@ -88,6 +88,7 @@ func sentence(s string, indicators []string, except *regexp2.Regexp, threshold f if i-1 >= 0 { prev = tokens[i-1] } + t := w if strings.Contains(w, "-") { // NOTE: This is necessary for words like `Top-level`. @@ -100,7 +101,7 @@ func sentence(s string, indicators []string, except *regexp2.Regexp, threshold f w = strings.Split(w, "’")[0] } - if w == strings.ToUpper(w) || hasAnySuffix(prev, indicators) || isMatch(except, w) { + if w == strings.ToUpper(w) || hasAnySuffix(prev, indicators) || isMatch(except, t) { count++ } else if i == 0 && w != strings.Title(strings.ToLower(w)) { return false diff --git a/testdata/fixtures/checks/Capitalization/.vale.ini b/testdata/fixtures/checks/Capitalization/.vale.ini index fa2e44df..c39d2326 100644 --- a/testdata/fixtures/checks/Capitalization/.vale.ini +++ b/testdata/fixtures/checks/Capitalization/.vale.ini @@ -7,3 +7,6 @@ demo.Cap = YES [test2.md] demo.CustomCap = YES + +[test3.md] +demo.SentenceCaseAny = YES diff --git a/testdata/fixtures/checks/Capitalization/test3.md b/testdata/fixtures/checks/Capitalization/test3.md new file mode 100644 index 00000000..d2734941 --- /dev/null +++ b/testdata/fixtures/checks/Capitalization/test3.md @@ -0,0 +1,7 @@ +# Test + +Try the High-Def Render Pipeline. + +Try the H-Def Render Pipeline. + +Try the High Definition Render Pipeline. \ No newline at end of file diff --git a/testdata/fixtures/comments/_vale b/testdata/fixtures/comments/_vale index 6c95d920..c0e71fca 100755 --- a/testdata/fixtures/comments/_vale +++ b/testdata/fixtures/comments/_vale @@ -8,3 +8,4 @@ vale.Spelling = NO demo.CheckLinks = NO demo.Spellcheck = NO demo.ZeroOccurrence = NO +demo.SentenceCaseAny = NO diff --git a/testdata/fixtures/styles/demo/_vale b/testdata/fixtures/styles/demo/_vale index 7e8761f8..6ff0413c 100755 --- a/testdata/fixtures/styles/demo/_vale +++ b/testdata/fixtures/styles/demo/_vale @@ -17,6 +17,7 @@ demo.Cap = NO demo.ZeroOccurrence = NO demo.CustomCap = NO demo.MinCount = NO +demo.SentenceCaseAny = NO Limit.Rule = YES diff --git a/testdata/styles/Vocab/Cap/accept.txt b/testdata/styles/Vocab/Cap/accept.txt index dd661647..24b23ef5 100644 --- a/testdata/styles/Vocab/Cap/accept.txt +++ b/testdata/styles/Vocab/Cap/accept.txt @@ -1,3 +1,6 @@ congressman hubba very +High-Def Render Pipeline +H-Def Render Pipeline +High Definition Render Pipeline \ No newline at end of file diff --git a/testdata/styles/demo/SentenceCaseAny.yml b/testdata/styles/demo/SentenceCaseAny.yml new file mode 100644 index 00000000..c6a08343 --- /dev/null +++ b/testdata/styles/demo/SentenceCaseAny.yml @@ -0,0 +1,6 @@ +extends: capitalization +message: "'%s' should be sentence-cased" +level: warning +match: $sentence +indicators: + - ":" From 49fbbc0da9a2fad2f861a9431e93cf5eccebfb18 Mon Sep 17 00:00:00 2001 From: jdkato Date: Wed, 2 Aug 2023 13:24:03 -0700 Subject: [PATCH 11/12] docs: add Appwrite --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1602fbe9..acbb645e 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ## :heart: Sponsors -> Hi there! I'm [@jdkato](https://github.com/jdkato), the sole developer of Vale. If you'd like to help me dedicate more time to *developing*, *documenting*, and *supporting* Vale, feel free to donate through the [Open Collective](https://opencollective.com/vale). Any donation—big, small, one-time, or recurring—is greatly appreciated! +> Hi there! I'm [@jdkato](https://github.com/jdkato), the sole developer of Vale. If you'd like to help me dedicate more time to _developing_, _documenting_, and _supporting_ Vale, feel free to donate through the [Open Collective](https://opencollective.com/vale). Any donation—big, small, one-time, or recurring—is greatly appreciated! ### Organizations @@ -39,9 +39,9 @@ -### Hosting +### Other -> Special thanks to [DigitalOcean][1] for providing hosting credits for [Vale Studio][2]. +> Thanks to [DigitalOcean][1] for providing hosting credits for [Vale Studio][2].

@@ -49,6 +49,14 @@

+> Thanks to [Appwrite][4] for supporting Vale through their [Open Source Sponsorship program][3]. + +

+ + + +

+ ### Individuals @@ -57,7 +65,7 @@ - [x] **Support for markup**: Vale has a rich understanding of many [markup formats](https://docs.errata.ai/vale/scoping#formats), allowing it to avoid syntax-related false positives and intelligently exclude code snippets from prose-related rules. -- [x] A **highly customizable** [extension system](https://vale.sh/docs/topics/styles/): Vale is capable of enforcing *your style*—be it a standard [editorial style guide](https://github.com/errata-ai/styles#available-styles) or a custom in-house set of rules (such as those created by [GitLab](https://docs.gitlab.com/ee/development/documentation/testing.html#vale), [Homebrew](https://github.com/Homebrew/brew/tree/master/docs/vale-styles/Homebrew), [Linode](https://www.linode.com/blog/linode/docs-as-code-at-linode/), [CockroachDB](https://github.com/cockroachdb/docs/tree/master/vale), and [Spotify](https://github.com/spotify/backstage)). +- [x] A **highly customizable** [extension system](https://vale.sh/docs/topics/styles/): Vale is capable of enforcing _your style_—be it a standard [editorial style guide](https://github.com/errata-ai/styles#available-styles) or a custom in-house set of rules (such as those created by [GitLab](https://docs.gitlab.com/ee/development/documentation/testing.html#vale), [Homebrew](https://github.com/Homebrew/brew/tree/master/docs/vale-styles/Homebrew), [Linode](https://www.linode.com/blog/linode/docs-as-code-at-linode/), [CockroachDB](https://github.com/cockroachdb/docs/tree/master/vale), and [Spotify](https://github.com/spotify/backstage)). - [x] **Easy-to-install**, stand-alone binaries: Unlike other tools, Vale doesn't require you to install and configure a particular programming language and its related tooling (such as Python/pip or Node.js/npm). @@ -70,7 +78,7 @@ See the [documentation](https://vale.sh) for more information. ### Functionality | Tool | Extensible | Checks | Supports Markup | Built With | License | -|------------|----------------------|-----------------|-------------------------------------------------------------------------|------------|--------------| +| ---------- | -------------------- | --------------- | ----------------------------------------------------------------------- | ---------- | ------------ | | Vale | Yes (via YAML) | spelling, style | Yes (Markdown, AsciiDoc, reStructuredText, HTML, XML, Org) | Go | MIT | | textlint | Yes (via JavaScript) | spelling, style | Yes (Markdown, AsciiDoc, reStructuredText, HTML, Re:VIEW) | JavaScript | MIT | | RedPen | Yes (via Java) | spelling, style | Yes (Markdown, AsciiDoc, reStructuredText, Textile, Re:VIEW, and LaTeX) | Java | Apache-2.0 | @@ -134,7 +142,7 @@ The corpus IDs in the above plots—`gitlab` and `ydkjs`—correspond to - A [snapshot](https://gitlab.com/gitlab-org/gitlab/-/tree/7d6a4025a0346f1f50d2825c85742e5a27b39a8b/doc) of GitLab's open-source documentation (1,500 Markdown files). -- A [chapter](https://raw.githubusercontent.com/getify/You-Dont-Know-JS/1st-ed/es6%20%26%20beyond/ch2.md) from the open-source book *You Don't Know JS*. +- A [chapter](https://raw.githubusercontent.com/getify/You-Dont-Know-JS/1st-ed/es6%20%26%20beyond/ch2.md) from the open-source book _You Don't Know JS_. ## :page_facing_up: License @@ -142,3 +150,5 @@ The corpus IDs in the above plots—`gitlab` and `ydkjs`—correspond to [1]: https://www.digitalocean.com/open-source/credits-for-projects [2]: https://studio.vale.sh/ +[3]: https://appwrite.io/oss-fund +[4]: https://appwrite.io/ From 64913f7ce2f08aaf8c6202d24f41041b67b42e4f Mon Sep 17 00:00:00 2001 From: jdkato Date: Wed, 2 Aug 2023 13:42:42 -0700 Subject: [PATCH 12/12] docs: add 'Appwrite' to vocab --- .github/styles/Vocab/Vale/accept.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/styles/Vocab/Vale/accept.txt b/.github/styles/Vocab/Vale/accept.txt index 7eee131c..1ade2005 100644 --- a/.github/styles/Vocab/Vale/accept.txt +++ b/.github/styles/Vocab/Vale/accept.txt @@ -2,6 +2,7 @@ alex api apos +Appwrite asciidoc asciidoctor backreferences