From 184dd8b81effebb0cb44f490c3ef134fd63d2661 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 20:36:26 +0000 Subject: [PATCH 1/2] Add Vale check for missing punctuation between sentences Co-Authored-By: Devin Logan --- .vale/styles/FernStyles/SentencePunctuation.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .vale/styles/FernStyles/SentencePunctuation.yml diff --git a/.vale/styles/FernStyles/SentencePunctuation.yml b/.vale/styles/FernStyles/SentencePunctuation.yml new file mode 100644 index 00000000..0dadff3d --- /dev/null +++ b/.vale/styles/FernStyles/SentencePunctuation.yml @@ -0,0 +1,14 @@ +extends: existence +message: "Missing punctuation between sentences. Add ., ?, !, or ;" +link: https://learn.microsoft.com/en-us/style-guide/punctuation/periods +level: warning +scope: paragraph +nonword: true + +# Heuristics: +# 1) Previous token ends with a lowercase letter/digit/closer, then a space, then a common sentence-starter. +# 2) Previous token ends with a lowercase letter/digit/closer, then a space, then a Capitalized word followed by a common auxiliary/verb. +# These aim to reduce false positives like "API Reference" and "John Smith". +tokens: + - "([a-z0-9\\)\\]\\\"\\'\\'\\"])\\s+(This|That|These|Those|We|You|They|It|I|The|A|An|In|On|At|If|When|While|After|Before|However|Therefore|Then|Next|Finally|Also|Note|To)\\b" + - "([a-z0-9\\)\\]\\\"\\'\\'\\"])\\s+([A-Z][a-z]+)\\s+(is|are|was|were|has|have|can|could|should|will|would|do|does|did)\\b" From caa3af46785fcd2ff18787b3fff83816732cadd1 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 23:13:21 +0000 Subject: [PATCH 2/2] Fix Vale SentencePunctuation rule: correct YAML syntax and reduce false positives - Use single-quoted YAML strings to fix syntax errors - Change \s+ to [ \t]+ to prevent cross-line matches - Remove ambiguous starters (The, A, An, In, On, At, To) to reduce false positives in code blocks - Tested on real documentation files to verify no false positives in code blocks Co-Authored-By: Devin Logan --- .vale/styles/FernStyles/SentencePunctuation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.vale/styles/FernStyles/SentencePunctuation.yml b/.vale/styles/FernStyles/SentencePunctuation.yml index 0dadff3d..60264a35 100644 --- a/.vale/styles/FernStyles/SentencePunctuation.yml +++ b/.vale/styles/FernStyles/SentencePunctuation.yml @@ -6,9 +6,9 @@ scope: paragraph nonword: true # Heuristics: -# 1) Previous token ends with a lowercase letter/digit/closer, then a space, then a common sentence-starter. +# 1) Previous token ends with a lowercase letter/digit/closer, then a space, then a common sentence-starter (trimmed to reduce false positives). # 2) Previous token ends with a lowercase letter/digit/closer, then a space, then a Capitalized word followed by a common auxiliary/verb. # These aim to reduce false positives like "API Reference" and "John Smith". tokens: - - "([a-z0-9\\)\\]\\\"\\'\\'\\"])\\s+(This|That|These|Those|We|You|They|It|I|The|A|An|In|On|At|If|When|While|After|Before|However|Therefore|Then|Next|Finally|Also|Note|To)\\b" - - "([a-z0-9\\)\\]\\\"\\'\\'\\"])\\s+([A-Z][a-z]+)\\s+(is|are|was|were|has|have|can|could|should|will|would|do|does|did)\\b" + - '([a-z0-9\)\]])[ \t]+(This|That|These|Those|We|You|They|It|I|However|Therefore|Then|Next|Finally|Also|Note|If|When|While|After|Before)\b' + - '([a-z0-9\)\]])[ \t]+([A-Z][a-z]+)[ \t]+(is|are|was|were|has|have|can|could|should|will|would|do|does|did)\b'