|
| 1 | +StylesPath = .vale/styles |
| 2 | +MinAlertLevel = warning |
| 3 | +; Pinned deliberately. A bare `Packages = Google` resolves to whatever release the |
| 4 | +; feed serves at `vale sync` time, so the corpus moves underneath baseline.json and |
| 5 | +; findings appear as NEW without a word of prose changing. Note the project also |
| 6 | +; moved errata-ai -> vale-cli. Bump this URL on purpose, and reseed in the same change. |
| 7 | +Packages = https://github.com/vale-cli/Google/releases/download/v0.7.1/Google.zip |
| 8 | +; Corosio domain vocabulary: .vale/styles/config/vocabularies/Corosio/accept.txt. |
| 9 | +; It holds genuine prose words and proper nouns ONLY. Bare C++ identifiers used as |
| 10 | +; running text stay unlisted on purpose — they are style-guide B1 defects and must |
| 11 | +; keep showing up as Vale.Spelling alerts until the prose is fixed. |
| 12 | +Vocab = Corosio |
| 13 | +[*.adoc] |
| 14 | +BasedOnStyles = Vale, Google, Corosio |
| 15 | +; NO BlockIgnores here, on purpose. Vale's native AsciiDoc handling (it shells out to |
| 16 | +; asciidoctor and only lints extracted prose nodes) already excludes delimited listing |
| 17 | +; blocks — `[source,cpp]`/`----`, bare `----`, `....` literal blocks, blocks nested in |
| 18 | +; list items or admonitions, `role=pseudocode`/`role=external`, and callout markers are |
| 19 | +; all skipped natively. A `BlockIgnores = (?s) *(\[source.*?----.*?----)` substitution |
| 20 | +; does NOT additionally protect anything — it destroys the `----` delimiters before |
| 21 | +; asciidoctor sees them, which corrupts the block structure and hands the code inside to |
| 22 | +; the linter as if it were a paragraph. That was measured on Capy's corpus, where |
| 23 | +; removing the line dropped `.adoc` warning-level alerts 503 -> 376; Corosio inherits the |
| 24 | +; decision rather than re-deriving it. If you are tempted to add a BlockIgnores line for |
| 25 | +; source blocks: don't. Confirm first, with an isolated fixture, that Vale is actually |
| 26 | +; failing to skip something. |
| 27 | +; |
| 28 | +; One Vale/asciidoctor artifact to know about before chasing a missing alert: a |
| 29 | +; correctly-excluded code block can suppress an UNRELATED, later Vale.Spelling or |
| 30 | +; Google.Colons alert when the block's own text shares a SUBSTRING with the flagged word, |
| 31 | +; and only when the block sits BEFORE the flagged prose in the file. Reduced fixture: |
| 32 | +; `// token` before a paragraph containing `foo_token` suppresses the alert; `// hello` |
| 33 | +; before it does not. This is a position-resolution artifact, not something any |
| 34 | +; BlockIgnores/TokenIgnores value controls — do not try to "fix" it with a config change |
| 35 | +; without a bite-tested fixture proving the change does something. |
| 36 | +; |
| 37 | +; Ignore inline code spans (backticks) AND `cpp:target[...]` reference macros: the B1 |
| 38 | +; conversion replaces backtick symbol spans with cpp: macros, and their symbol text must |
| 39 | +; stay unlinted, exactly as the backtick spans were. |
| 40 | +; |
| 41 | +; The third clause is the fixed label of the boost-wide thread-safety idiom |
| 42 | +; ("Distinct objects: Safe." / "Shared objects: Unsafe."). Each instance is a genuine |
| 43 | +; Google.Colons hit, but the form is boost-wide and Corosio does not get to rewrite it; |
| 44 | +; `grep -ro '\(Distinct\|Shared\) objects:' --include='*.hpp' include` reports 72, spread |
| 45 | +; over io_context, resolver_results, endpoint, signal_set, tcp_acceptor, the TLS streams |
| 46 | +; and others. Only the LABEL and its colon are blanked, so whatever follows stays fully |
| 47 | +; linted by every other rule; the pattern deliberately does NOT spell out "Safe."/ |
| 48 | +; "Unsafe." because instances continue into longer clauses that a phrase-exact form would |
| 49 | +; leave exposed while suppressing its siblings. |
| 50 | +; This is NOT a Google.Colons demotion, on purpose: demoting the rule would also hide the |
| 51 | +; genuine non-idiom Colons hits. |
| 52 | +TokenIgnores = (\x60[^\x60]+\x60), (cpp:[^\s\[]*\[[^\]]*\]), ((?:Distinct|Shared) objects:) |
| 53 | + |
| 54 | +; --- Google house-style pack: deliberately demoted, not abandoned ---------------- |
| 55 | +; These eight rules encode GOOGLE's house style, not Corosio defects, and are scoped out |
| 56 | +; of the "vale clean" criterion. They are demoted to `suggestion` (below MinAlertLevel) |
| 57 | +; rather than removed, so a curious reader can still run |
| 58 | +; `vale --minAlertLevel=suggestion` and see them. Counts below are measured on Corosio's |
| 59 | +; two corpora at the port commit — `.adoc` = doc/modules, docstrings = |
| 60 | +; lint/.docstrings — and are the same ruling Capy made, re-measured here rather than |
| 61 | +; inherited. |
| 62 | +; |
| 63 | +; Google.Headings — Corosio writes Title Case section headings; Google style mandates |
| 64 | +; sentence case. Retitling every heading is a user-visible house-style change, not a |
| 65 | +; defect fix. |
| 66 | +; Google.WordListCase — Google's capitalisation list for words like "Internet"/"email"; |
| 67 | +; disagrees with Boost usage, not with Part C. Note Corosio's networking tutorial uses |
| 68 | +; "Internet" heavily, so this rule is noisier here than in Capy. |
| 69 | +; Google.EmDash — bans spaced em dashes. Corosio uses ` -- ` (AsciiDoc's em-dash form) as |
| 70 | +; a deliberate typographic convention. |
| 71 | +; Google.We / Google.FirstPerson — ban first-person. The tutorial and design prose |
| 72 | +; address the reader directly by design (D1/D3). |
| 73 | +; Google.Latin — bans "e.g."/"i.e."; both are standard in Boost reference documentation. |
| 74 | +; Google.Quotes — demands commas and periods inside quotation marks (US convention). |
| 75 | +; Corosio quotes code-like strings, where moving punctuation inside the quotes would |
| 76 | +; misstate the string's contents. |
| 77 | +; Google.Spacing — flags spacing around punctuation in prose that is mostly quoted code. |
| 78 | +; |
| 79 | +; NOT demoted, on purpose: Google.Will (a genuine C4 signal, and C4 is gated), |
| 80 | +; Google.Colons, Google.OxfordComma, Google.LyHyphens, Google.Units, Google.Ordinal. |
| 81 | +; |
| 82 | +; Google.LyHyphens misfires on Corosio's `family-*` compounds -- `family-neutral`, |
| 83 | +; `family-sensitive`, `family-generic`, `family-specific`. The rule targets adverb |
| 84 | +; hyphenation (`newly-created`) and matches these only because "family" ends in "ly". |
| 85 | +; The hyphens are correct: they are compound adjectives, not adverbs. The rule stays |
| 86 | +; un-demoted because it catches the real thing elsewhere, so this bounded set of false |
| 87 | +; positives is carried in baseline.json instead -- grandfathered on purpose, not by |
| 88 | +; accident. Re-check it if the `family-*` vocabulary grows. |
| 89 | +Google.Headings = suggestion |
| 90 | +Google.WordListCase = suggestion |
| 91 | +Google.EmDash = suggestion |
| 92 | +Google.We = suggestion |
| 93 | +Google.FirstPerson = suggestion |
| 94 | +Google.Latin = suggestion |
| 95 | +Google.Quotes = suggestion |
| 96 | +Google.Spacing = suggestion |
0 commit comments