Skip to content

Commit 4f59ebf

Browse files
vale style checks
1 parent 8a847ab commit 4f59ebf

29 files changed

Lines changed: 1659 additions & 26 deletions

.github/workflows/vale.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Vale
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- release
8+
9+
jobs:
10+
vale:
11+
name: Lint prose (ts-docs)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Run Vale
18+
uses: errata-ai/vale-action@v2
19+
with:
20+
# CI config: ts-docs rules only, error level gate.
21+
# Does not run vale sync — no package downloads needed.
22+
config: .vale-ci.ini
23+
# Check only files changed in this PR.
24+
files: changed
25+
# Fail the build on errors (merge conflict markers,
26+
# unfilled placeholders). Warnings are reported but
27+
# do not block the PR.
28+
fail_on_error: true
29+
reporter: github-pr-review
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ docs/public/
106106
# TernJS port file
107107
.tern-port
108108

109+
# Vale prose linter — downloaded packages (committed: ts-docs style + ts-vocab)
110+
# Run `vale sync` after cloning to download these.
111+
.vale/styles/Google/
112+
.vale/styles/Microsoft/
113+
109114
# Code editors or IDEs
110115
.vscode/
111116

.vale-ci.ini

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# =============================================================
2+
# .vale-ci.ini — CI-only Vale configuration
3+
# =============================================================
4+
# Used exclusively by the GitHub Actions vale.yml workflow.
5+
# Runs only the committed ts-docs style; does NOT require
6+
# `vale sync` (no Google / Microsoft packages are downloaded).
7+
#
8+
# Gate: MinAlertLevel = error — only hard errors fail the build.
9+
# ts-docs rules at error level:
10+
# - PreCommitChecks (merge conflict markers, unfilled placeholders)
11+
# =============================================================
12+
13+
StylesPath = .vale/styles
14+
MinAlertLevel = error
15+
Vocab = ts-vocab
16+
17+
[*.{adoc,asciidoc}]
18+
BasedOnStyles = ts-docs
19+
20+
# Preserve the same AsciiDoc comment and inline-span exclusions as .vale.ini
21+
TokenIgnores = (\/\/.+), (\[(?:\.version-badge[^\]]*|tag [^\]]*|earlyAccess [^\]]*|beta [^\]]*)\][#^][^#^]+[#^]), (\[(NOTE|TIP|WARNING|IMPORTANT|CAUTION|DANGER)\])
22+
BlockIgnores = (?s)(\/{4}[\s\S]*?\/{4})

.vale.ini

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# =============================================================
2+
# .vale.ini — ThoughtSpot Developer Docs
3+
# =============================================================
4+
# SETUP (one-time, after cloning):
5+
# vale sync
6+
# This downloads Google and Microsoft into .vale/styles/ (gitignored).
7+
# The ts-docs custom style and ts-vocab vocabulary are committed to the repo.
8+
#
9+
# USAGE:
10+
# vale path/to/file.adoc
11+
# vale modules/ROOT/pages/
12+
#
13+
# INTELLIJ IDEA:
14+
# Settings > Tools > Vale > Config: point to this file.
15+
# The AsciiDoc plugin picks up Vale alerts inline.
16+
# =============================================================
17+
18+
StylesPath = .vale/styles
19+
20+
# suggestion = show everything (noisy, good for authoring)
21+
# warning = hide suggestions, show warnings + errors (recommended for review)
22+
# error = show only blocking errors (good for CI gates)
23+
MinAlertLevel = suggestion
24+
25+
# ---- Packages (downloaded by `vale sync`, then gitignored) --
26+
Packages = Google, Microsoft
27+
28+
# ---- Shared vocabulary --------------------------------------
29+
# Files: .vale/styles/config/vocabularies/ts-vocab/accept.txt
30+
# reject.txt
31+
Vocab = ts-vocab
32+
33+
# =============================================================
34+
# Catch-all: disable Vale on every file type not listed below.
35+
# This prevents IDE plugins from running checks on .yml, .json,
36+
# .js, and other non-prose files even when .valeignore is ignored.
37+
# =============================================================
38+
[*]
39+
BasedOnStyles =
40+
41+
# =============================================================
42+
# AsciiDoc files (authored content only)
43+
# Generated pages and node_modules are excluded via .valeignore
44+
# =============================================================
45+
[*.{adoc,asciidoc}]
46+
BasedOnStyles = Google, Microsoft, ts-docs
47+
48+
# ---- Comment exclusions -------------------------------------
49+
# AsciiDoc single-line comments (// text) are ignored.
50+
# AsciiDoc block comments (////...////) are ignored.
51+
# EXCEPTION: comments inside ---- code blocks are part of code
52+
# content and are preserved by Asciidoctor — they are not
53+
# matched by these patterns and continue to be checked.
54+
# Inline role spans are also stripped before style rules run so that
55+
# capitalization checks do not fire on fixed labels:
56+
# [.version-badge.*]#New# [.version-badge.*]#Breaking#
57+
# [tag *]#NEW FEATURE# [tag *]#DEPRECATED#
58+
# [earlyAccess *]#Early Access# [beta *]^Beta^
59+
# [NOTE] [WARNING] [IMPORTANT] [TIP] [CAUTION]
60+
TokenIgnores = (\/\/.+), (\[(?:\.version-badge[^\]]*|tag [^\]]*|earlyAccess [^\]]*|beta [^\]]*)\][#^][^#^]+[#^]), (\[(NOTE|TIP|WARNING|IMPORTANT|CAUTION|DANGER)\])
61+
BlockIgnores = (?s)(\/{4}[\s\S]*?\/{4})
62+
63+
# ---- Rule overrides -----------------------------------------
64+
# Tuned based on audit of alerts against ThoughtSpot developer docs.
65+
66+
# Vocabulary: managed by ts-vocab; disable built-in Microsoft vocab.
67+
Microsoft.Vocab = NO
68+
69+
# Headings: sentence case enforced by ts-docs.Headings.
70+
Google.Headings = NO
71+
Microsoft.Headings = NO
72+
Microsoft.HeadingPunctuation = NO
73+
Microsoft.HeadingAcronyms = NO
74+
75+
# Passive voice: sometimes necessary in reference docs.
76+
Microsoft.Passive = NO
77+
Google.Passive = suggestion
78+
79+
# Contractions: avoid in formal developer docs.
80+
Microsoft.Contractions = NO
81+
82+
# List-item punctuation: technical lists often don't end with periods.
83+
Microsoft.Periods = NO
84+
85+
# Oxford comma: required.
86+
Google.OxfordComma = error
87+
88+
# URLs: Antora/AsciiDoc handles link formatting; these rules add noise.
89+
Microsoft.GeneralURL = NO
90+
Microsoft.URLFormat = NO
91+
92+
# Sentence length: covered by ts-docs.SentenceLength.
93+
Microsoft.SentenceLength = NO
94+
95+
# Parentheses and optional plurals: too noisy for technical API docs.
96+
Google.Parens = NO
97+
Google.OptionalPlurals = NO
98+
99+
# Google WordList: contains Google-internal product name substitutions
100+
# (for example, Cloud → "Google Cloud Platform") that conflict with
101+
# ThoughtSpot product names. Applicable entries are maintained in
102+
# ts-docs/WordList.yml instead.
103+
Google.WordList = NO
104+
105+
# Date format: downgraded from error — docs use various date formats
106+
# depending on context (API responses, UI labels, prose).
107+
Microsoft.DateFormat = suggestion
108+
Google.DateFormat = suggestion
109+
110+
# Colon capitalisation: flags proper nouns and product names after colons.
111+
# Cannot be tuned without rewriting the rule.
112+
Google.Colons = NO
113+
Microsoft.HeadingColons = NO
114+
115+
# Semicolons: "Use semicolons judiciously" is not actionable feedback.
116+
Google.Semicolons = NO
117+
Microsoft.Semicolon = NO
118+
119+
# Dotted abbreviations: error-level rule flagging U.S.A.-style patterns.
120+
# Writers are aware of this convention; same check was intentionally
121+
# excluded from ts-docs styles.
122+
Google.Periods = NO
123+
124+
# Avoided terms: relevant token (and so on) absorbed into ts-docs.DoNotUseTerms.
125+
# Remaining tokens are Microsoft-specific or legitimate in ThoughtSpot docs.
126+
Microsoft.Avoid = NO
127+
128+
# Wordy phrases: applicable substitutions absorbed into ts-docs.WordList.
129+
# Rule suppressed to avoid duplicate alerts.
130+
Microsoft.Wordiness = NO
131+
132+
# =============================================================
133+
# Markdown files
134+
# =============================================================
135+
[*.{md,markdown}]
136+
BasedOnStyles = Google, Microsoft, ts-docs
137+
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# ts-vocab/accept.txt
2+
# Terms Vale's spell-check should accept as correctly spelled.
3+
# One entry per line. Regex is supported.
4+
# Add product names, SDK identifiers, and technical terms here
5+
# rather than suppressing spell-check globally.
6+
7+
# -------------------------------------------------------
8+
# THOUGHTSPOT PRODUCT AND PLATFORM NAMES
9+
# Prose form - correctly capitalised brand name
10+
# -------------------------------------------------------
11+
ThoughtSpot
12+
ThoughtSpot Cloud
13+
ThoughtSpot Embedded
14+
Visual Embed SDK
15+
REST API v2
16+
REST API Playground
17+
ThoughtSpotSDK
18+
ThoughtSpotRestApi
19+
ThoughtSpotDeliveryRole
20+
21+
# -------------------------------------------------------
22+
# THOUGHTSPOT LOWERCASE / CODE-CONTEXT VARIANTS
23+
# These appear legitimately in URLs, config parameters,
24+
# variable names, and code - accepted here so the spell
25+
# checker does not flag them.
26+
# -------------------------------------------------------
27+
thoughtspot
28+
thoughtSpotHost
29+
thoughtSpotUrl
30+
thoughtspot\.cloud
31+
tsconfig
32+
tsEmbedSDK
33+
34+
# -------------------------------------------------------
35+
# SPOTTER / AI PRODUCT NAMES
36+
# -------------------------------------------------------
37+
Spotter
38+
SpotterAgent
39+
SpotterCode
40+
SpotterDocs
41+
SpotterEmbed
42+
SpotterAgentEmbed
43+
SpotterAgentEmbedConfig
44+
SpotterAgentEmbedViewConfig
45+
SpotterChatConnectors
46+
SpotterChatConnectorResources
47+
SpotterChatDelete
48+
SpotterChatMenu
49+
SpotterChatModeSwitcher
50+
SpotterChatRename
51+
SpotterChatViewConfig
52+
SpotterConversationDeleted
53+
SpotterConversationRenamed
54+
SpotterConversationSelected
55+
SpotterCSS
56+
SpotterEmbedViewConfig
57+
SpotterFeedback
58+
SpotterInit
59+
SpotterMessage
60+
SpotterNewChat
61+
SpotterPastChatBanner
62+
SpotterQueryTriggered
63+
SpotterSearch
64+
SpotterSidebarFooter
65+
SpotterSidebarHeader
66+
SpotterSidebarToggle
67+
SpotterSidebarViewConfig
68+
SpotterTokenQuickEdit
69+
SpotterWarningsBanner
70+
SpotterWarningsOnTokens
71+
ConversationEmbed
72+
73+
# -------------------------------------------------------
74+
# EMBED SDK COMPONENT NAMES
75+
# -------------------------------------------------------
76+
AppEmbed
77+
LiveboardEmbed
78+
LiveboardEmbedController
79+
LiveboardEmbedView
80+
SearchEmbed
81+
SearchBarEmbed
82+
SpotterAgentEmbed
83+
PreRenderedLiveboardEmbed
84+
TsEmbedSDK
85+
SwiftEmbedSDK
86+
TSEmbedConfig
87+
EmbedConfig
88+
visual-embed-sdk
89+
90+
# -------------------------------------------------------
91+
# LIVEBOARD AND DATA TYPES
92+
# -------------------------------------------------------
93+
Liveboard
94+
Liveboards
95+
LiveboardActionData
96+
LiveboardConfigStyle
97+
LiveboardContextActionData
98+
LiveboardController
99+
LiveboardData
100+
LiveboardInfo
101+
LiveboardPureStyle
102+
LiveboardRendered
103+
LiveboardScheduleData
104+
LiveboardSchedules
105+
LiveboardStyle
106+
LiveboardStyleConfig
107+
LiveboardStylePanel
108+
LiveboardUsers
109+
LiveboardView
110+
LiveboardViewConfig
111+
112+
# -------------------------------------------------------
113+
# AUTH AND CONFIG TYPES
114+
# -------------------------------------------------------
115+
AuthType
116+
TrustedAuthToken
117+
TrustedAuthTokenCookieless
118+
TrustedAuthCookieless
119+
EmbedEvent
120+
HostEvent
121+
RuntimeFilter
122+
RuntimeSort
123+
OAuthRedirectWindowType
124+
ConnectionType
125+
126+
# -------------------------------------------------------
127+
# PLATFORM AND FEATURE TERMS
128+
# -------------------------------------------------------
129+
SpotApps
130+
SpotDev
131+
spotdev
132+
TML
133+
GUID
134+
Antora
135+
TSCLI
136+
tscli
137+
138+
# Worksheet is deprecated in prose (WordList.yml flags it).
139+
# Retained here so the spell checker does not flag the term
140+
# in code blocks or SDK parameter contexts (e.g. worksheetId).
141+
Worksheet
142+
Worksheets
143+
worksheetId
144+
worksheetIds
145+
146+
# -------------------------------------------------------
147+
# INTEGRATION AND CLOUD
148+
# -------------------------------------------------------
149+
Snowflake
150+
Databricks
151+
Salesforce
152+
Vercel
153+
Pendo
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# ts-vocab/reject.txt
2+
# Plain English terms that are wrong in ALL contexts (prose, headings).
3+
# Vale flags any match as a spelling error.
4+
# One entry per line. Regex is supported.
5+
#
6+
# SCOPE NOTE: reject.txt runs through the spell checker.
7+
# Code blocks are excluded by Vale's Asciidoctor parser, but
8+
# inline code and attribute values may still be checked.
9+
# For deprecated SDK class names, use WordList.yml (tokens:)
10+
# which is strictly prose-scoped.
11+
#
12+
# Use this file only for plain English words that are ALWAYS
13+
# wrong in authored prose, regardless of context.
14+
15+
# -------------------------------------------------------
16+
# DEPRECATED PRODUCT / FEATURE NAMES
17+
# "pinboard" and "pinboards" are plain English words that
18+
# should always be replaced with Liveboard in prose.
19+
# Word boundaries prevent matching PinboardEmbed etc.
20+
# -------------------------------------------------------
21+
\bpinboard\b
22+
\bpinboards\b
23+
\bPinboard\b
24+
\bPinboards\b
25+
26+
# -------------------------------------------------------
27+
# ADD DEPRECATED OR BANNED TERMS BELOW
28+
# -------------------------------------------------------
29+
# OldProductName

0 commit comments

Comments
 (0)