fix(docs): clear the Vale findings, and fix the rule that produced most of them - #429
Open
eugenia-scandit wants to merge 1 commit into
Open
fix(docs): clear the Vale findings, and fix the rule that produced most of them#429eugenia-scandit wants to merge 1 commit into
eugenia-scandit wants to merge 1 commit into
Conversation
…st of them
233 findings across 57 files. Only 79 were real.
Google.Spacing matches `[a-z][.?!][A-Z]` anywhere, which in API documentation
is overwhelmingly a code identifier rather than a sentence:
SymbologySettings.Checksums, context.SetFrameSourceAsync(),
Scandit.DataCapture.Core.Maui. Of its 155 findings, 154 were identifiers and
exactly one was a real missing space. Acting on the other 154 would have
corrupted a symbol name each time - so the rule needed fixing, not the prose.
styles/Scandit/Spacing.yml replaces it (Google.Spacing = NO in .vale.ini) and
expresses the sentence boundary positionally, since RE2 has no lookaround: a
whole lowercase word, the punctuation, then a single capitalised word, with
whitespace on both outer edges. An identifier fails at least one part. It
still catches the one real case ("smart device.It requires").
An earlier attempt used TokenIgnores instead. It silently swallowed "e.g."
and "i.e." too, disabling Google.Latin - 46 real findings vanished and looked
like success. Worth recording: the cheap fix here quietly removes a rule you
wanted.
The remaining 79 are fixed as prose:
- 46 Latin abbreviations (e.g. / i.e. spelled out)
- 18 banned marketing words - "seamless user experience" -> "responsiveness",
"ensures seamless integration into your workflow" -> "fits into your
workflow", "simply change" -> "change", and so on: what the sentence claims,
minus the adjective that claimed it
- 8 optional plurals: item(s) -> items, plugin(s) -> plugins
- 2 ordinals (3rd-Party -> Third-Party), 2 em dashes, 1 quote placement,
1 unit spacing, 1 missing space after a full stop
Replacements are applied outside fenced and inline code only, so no snippet
changed meaning; the one finding inside a code comment was reworded by hand.
Vale now reports 0 findings across all 117 files, and the site builds.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
233 findings across 57 files. Only 79 were real.
Google.Spacing matches
[a-z][.?!][A-Z]anywhere, which in API documentation is overwhelmingly a code identifier rather than a sentence: SymbologySettings.Checksums, context.SetFrameSourceAsync(), Scandit.DataCapture.Core.Maui. Of its 155 findings, 154 were identifiers and exactly one was a real missing space. Acting on the other 154 would have corrupted a symbol name each time - so the rule needed fixing, not the prose.styles/Scandit/Spacing.yml replaces it (Google.Spacing = NO in .vale.ini) and expresses the sentence boundary positionally, since RE2 has no lookaround: a whole lowercase word, the punctuation, then a single capitalised word, with whitespace on both outer edges. An identifier fails at least one part. It still catches the one real case ("smart device.It requires").
An earlier attempt used TokenIgnores instead. It silently swallowed "e.g." and "i.e." too, disabling Google.Latin - 46 real findings vanished and looked like success. Worth recording: the cheap fix here quietly removes a rule you wanted.
The remaining 79 are fixed as prose:
Replacements are applied outside fenced and inline code only, so no snippet changed meaning; the one finding inside a code comment was reworded by hand. Vale now reports 0 findings across all 117 files, and the site builds.