-
Notifications
You must be signed in to change notification settings - Fork 40
docs: add style checks for headings and content guidelines #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
59796e5
docs: add Vale-based heading sentence-case style check
tomarra 6cf7423
docs: check every heading in CI instead of only PR-changed lines
tomarra b367674
docs: codify marketing content guidelines into style checks
tomarra 04c8780
docs: combine cspell, Vale, and component-label checks into one script
tomarra 1fdeac5
docs: add proper nouns discovered while fixing heading casing
tomarra 324ade4
docs: silence known-permanent Shorebird.Headings exceptions
tomarra 8308d83
Merge branch 'main' into docs/style-lint-headings
tomarra 2a5aaec
docs: make Shorebird.Headings and Shorebird.Exclamation blocking
tomarra dc26247
Merge branch 'main' into docs/style-lint-headings
tomarra c8c0857
clean up github action
tomarra 5b86509
docs: fix remaining CI failures and scope exceptions correctly
tomarra 1b06fd3
Merge remote-tracking branch 'origin/main' into docs/style-lint-headings
tomarra ba9df5e
ci: run component-label lint in style-check job
tomarra 27a6d4e
docs: make Shorebird.SecondPerson blocking
tomarra d2acf57
docs: make Vale.Terms blocking by fixing its root causes
tomarra 19fc8a1
Merge branch 'main' into docs/style-lint-headings
tomarra 1d64a63
Update .vale/styles/Shorebird/Exclamation.yml
tomarra 77436ae
formatting
tomarra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,6 +93,7 @@ words: | |
| - tabler | ||
| - temurin | ||
| - uiscene | ||
| - vvago | ||
| - webkitallowfullscreen | ||
| - widgetbook | ||
| - xcarchive | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| StylesPath = .vale/styles | ||
| MinAlertLevel = warning | ||
| Vocab = Shorebird | ||
|
|
||
| [formats] | ||
| mdx = md | ||
|
|
||
| [*.{md,mdx}] | ||
| BasedOnStyles = Shorebird, Vale | ||
| # Only Vale.Terms (the Vocab-driven proper-noun check) is wanted from the | ||
| # built-in Vale style; spell-checking is already handled by cspell. | ||
| Vale.Spelling = NO | ||
| Vale.Repetition = NO | ||
| # Global, rule-agnostic exceptions found while fixing every heading and | ||
| # proper noun in the docs (see PRs #579 and #583). Headings-specific | ||
| # exceptions (compound brand names, the numbered-list headings, "vs") live | ||
| # in .vale/styles/Shorebird/Headings.yml's own exceptions list instead, | ||
| # since that's scoped to just that rule. TokenIgnores is only needed here | ||
| # for things with no rule-scoped alternative: | ||
| # - Vale.Terms: a built-in, Vocab-driven check with no exceptions list of | ||
| # its own. Covers domains, an email address, a config filename mentioned | ||
| # two different ways, both GitHub issue shorthand forms used in the docs | ||
| # (with and without the "shorebirdtech/" org prefix), and a file path | ||
| # placeholder. | ||
| # - Shorebird.Exclamation: the `existence` extension type doesn't support | ||
| # an exceptions list the way `capitalization` does (verified). Covers a | ||
| # table row documenting the literal "[!]" symbol from real `flutter | ||
| # doctor` output. | ||
| # - Shorebird.Headings: "Flutter Hot Reload" can't be a Headings.yml | ||
| # exceptions entry (bare "Reload" or the phrase "Hot Reload" both | ||
| # collide with ordinary lowercase "hot reload" prose used as headings | ||
| # elsewhere - capitalization exceptions match case-insensitively and | ||
| # then want the exception's exact case, which misfires there). | ||
| # TokenIgnores does plain literal-text redaction with no such | ||
| # case-insensitive side effect, so it's the only safe option for this | ||
| # one heading. | ||
| # - Shorebird.SecondPerson: same `existence` limitation as Exclamation | ||
| # above, now that it's error severity too (see SecondPerson.yml). Each | ||
| # entry masks a literal string that contains a first-person pronoun but | ||
| # isn't first-person prose: | ||
| # - "i.e." (without the trailing comma, which isn't part of the token | ||
| # match) - the abbreviation, not the pronoun "I" | ||
| # - the URL slug for the FAQ's "can I use Shorebird in my country?" anchor | ||
| # - "US" as in "United States", in the one place it's used that way | ||
| # - "My Organization", the literal default name Shorebird gives new orgs | ||
| # - "How We Bill", quoting the actual heading of the billing page section | ||
| # - the one deliberate first-person sentence in testing-patches.mdx: a | ||
| # direct privacy pledge reads better as "we never know" than as a | ||
| # passive "it never knows" (see PR #585 review discussion) | ||
| TokenIgnores = (contact@shorebird\.dev), (console\.shorebird\.dev), \ | ||
| (docs\.shorebird\.dev), (download\.flutter\.dev), (shorebird\.yaml), \ | ||
| (shorebird yaml), (shorebirdtech/shorebird#\d+), (shorebird#\d+), \ | ||
| (/path/to/flutter), \ | ||
| (\[!\]), (Flutter Hot Reload), (i\.e\.), \ | ||
| (#can-i-use-shorebird-in-my-country), (US regions), (My Organization), \ | ||
| (How We Bill), (we _never_ know anything about your) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| extends: existence | ||
| message: 'Avoid exclamation points in documentation.' | ||
| link: https://developers.google.com/style/exclamation-points | ||
| level: error | ||
| scope: text | ||
| nonword: true | ||
| # Allow [!] (literal flutter doctor output) but not bare exclamation points | ||
| tokens: | ||
| - '!(?!\[)' # Negative lookahead: [!] is allowed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| extends: capitalization | ||
| message: | ||
| "'%s' should use sentence case (capitalize only the first word and proper | ||
| nouns)" | ||
| link: https://developers.google.com/style/capitalization | ||
| level: error | ||
| scope: heading | ||
| match: $sentence | ||
| exceptions: | ||
| - Shorebird | ||
| - Shorebird's | ||
| - Flutter | ||
| - Flutter's | ||
| - Dart | ||
| - Android | ||
| - iOS | ||
| - macOS | ||
| - Windows | ||
| - Linux | ||
| - Ubuntu | ||
| - Xcode | ||
| - GitHub | ||
| - CocoaPods | ||
| - Codemagic | ||
| - Fastlane | ||
| - Sentry | ||
| - Crashlytics | ||
| - Firebase | ||
| - Firestore | ||
| - TestFlight | ||
| - Darkly | ||
| - Play | ||
| - Store | ||
| - HashiCorp | ||
| - Vault | ||
| - Azure | ||
| - AWS | ||
| - GCP | ||
| - KMS | ||
| - CLI | ||
| - CI | ||
| - SDK | ||
| - API | ||
| - UI | ||
| - URL | ||
| - JSON | ||
| - YAML | ||
| - TLS | ||
| - PEM | ||
| - DER | ||
| - RSA | ||
| - OTA | ||
| - MDM | ||
| - PR | ||
| - OS | ||
| - APKs | ||
| - VS | ||
| - Podfile | ||
| - Swift | ||
| - Kotlin | ||
| - Java | ||
| - Objective-C | ||
| - BLoC | ||
| - npm | ||
| - I | ||
| - I'm | ||
| - I've | ||
| - I'll | ||
| - Stripe | ||
| - Fastfile | ||
| - BuildContext | ||
| - RenderObject | ||
| - Apple | ||
| - 1Password | ||
| - AOT | ||
| - GuardSquare | ||
| - LTS | ||
| - ExportOptions.plist | ||
| - Skia | ||
| - Impeller | ||
| - vs | ||
| - Remote | ||
| - Config | ||
| - Launch | ||
| - Azure Key Vault | ||
| - App Store Connect | ||
| - The Status Enum | ||
| - The Single State Class | ||
| - The Events | ||
| - Framework Search Paths | ||
| - GCP Cloud KMS | ||
| - React Native |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| extends: existence | ||
| message: | ||
| '''%s'' is first person; docs should be written in second person ("you")' | ||
| level: error | ||
| scope: paragraph | ||
| ignorecase: true | ||
| tokens: | ||
| - "\\bI\\b" | ||
| - "\\bI'm\\b" | ||
| - "\\bI've\\b" | ||
| - "\\bI'll\\b" | ||
| - "\\bwe\\b" | ||
| - "\\bwe're\\b" | ||
| - "\\bwe've\\b" | ||
| - "\\bwe'll\\b" | ||
| - "\\bour\\b" | ||
| - "\\bours\\b" | ||
| - "\\bus\\b" | ||
| - "\\blet's\\b" | ||
| - "\\bmy\\b" | ||
| - "\\bmine\\b" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Shorebird | ||
| Flutter | ||
| Code Push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.