diff --git a/.github/vale/README.md b/.github/vale/README.md new file mode 100644 index 000000000..ad0573fdb --- /dev/null +++ b/.github/vale/README.md @@ -0,0 +1,17 @@ +# LanceDB prose rules + +These five rule files are copied unchanged from the `LanceDB.zip` asset of +`lancedb/docs` release `vale-lancedb-v0.1.0`. The archive SHA-256 is +`0730a43e919774121068811d5687c61dfc7a0421cff78e1393f5e565b622cb0f`. + +Keeping the rules here lets contributors and CI run Vale without access to the +source repository. The root `.vale.ini` preserves the release's MDX settings +and built-in repeated-word check. No `vale sync` is needed. + +The rules check product names, dashes, plain language, vague headings and vague +phrases. Findings are suggestions and do not fail the CI check. + +To update, a maintainer downloads the next published package, verifies its +checksum and replaces `styles/LanceDB` with the release's files. Check the +package's `.vale.ini` for configuration changes, and update the version and +checksum here in the same PR. diff --git a/.github/vale/styles/LanceDB/Dashes.yml b/.github/vale/styles/LanceDB/Dashes.yml new file mode 100644 index 000000000..7bb10c96f --- /dev/null +++ b/.github/vale/styles/LanceDB/Dashes.yml @@ -0,0 +1,40 @@ +extends: existence +message: "Avoid '%s' in prose. Use a comma, a colon, parentheses or two sentences." +link: https://github.com/lancedb/docs/blob/main/STYLE.md#punctuation +level: warning +nonword: true +# An em dash in prose, and a double hyphen or en dash used as one, with a +# space on each side. A table cell holding only an em dash, meaning "none", +# ranges such as 1–3 and flags such as --force are left alone, and code is +# never prose. +raw: + - '(?.mdx`. -StylesPath = .vale/styles -Packages = https://github.com/lancedb/docs/releases/download/vale-lancedb-v0.1.0/LanceDB.zip +StylesPath = .github/vale/styles +MinAlertLevel = suggestion + +[*.mdx] +BasedOnStyles = LanceDB +Vale.Repetition = warning diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fa854317d..4a73f8b35 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,13 +88,12 @@ npm i -g mint # https://mintlify.com/docs/installation cd docs/web && mint dev ``` -Wording, names and punctuation follow the -[LanceDB style guide](https://github.com/lancedb/docs/blob/main/STYLE.md). -[Vale](https://vale.sh) checks part of it, and pull requests show its -suggestions on the lines they change. To check a page yourself: +[Vale](https://vale.sh) checks wording, names and punctuation using the +[bundled LanceDB rules](.github/vale/README.md). Pull requests show suggestions +on the lines they change. With Vale 3.24.0 installed, check a page with: ```bash -vale sync && vale docs/web/indexing/vector-index.mdx +vale docs/web/indexing/vector-index.mdx ``` This repository holds a page at every path the site publishes, so the whole