Skip to content

build: Make the sentence rule see line breaks - #368

Closed
aabedraba wants to merge 2 commits into
prod-stagingfrom
fix-vale-sentence-rule
Closed

aabedraba wants to merge 2 commits into
prod-stagingfrom
fix-vale-sentence-rule

Conversation

@aabedraba

Copy link
Copy Markdown
Collaborator

Unikraft.NoSentenceBreaks fires on every paragraph in the repo, because vale joins the lines of a paragraph with spaces before it matches, so . A at a line break looks the same as . A inside a line. That's why every PR gets a wall of "Only use one sentence per line" comments on perfectly fine lines (#366, #363, #358).

This swaps it for a script rule on the raw text, which walks the lines itself and skips code fences. On the current pages it finds 517 lines that really have two sentences, and nothing inside a code block. I think vale-action only reports on added lines, so those 517 won't fail anyone's PR until they touch them.

Not TODO:

  • Fix the 517 existing lines

Vale joins the lines of a paragraph with spaces before it runs a token
rule, so the old regex fired on every paragraph that already kept one
sentence per line. A script rule walks the raw lines instead, and skips
fenced code blocks.

Signed-off-by: aabedraba <abdallah@unikraft.com>
@aabedraba
aabedraba temporarily deployed to pull-requests November 3, 2026 18:47 — with GitHub Actions Inactive
@aabedraba

Copy link
Copy Markdown
Collaborator Author

@claude review

@github-actions
github-actions Bot temporarily deployed to pull-requests November 3, 2026 18:51 Inactive
The raw scope keeps the frontmatter, so a note text with two sentences
in one YAML value tripped the rule.

Signed-off-by: aabedraba <abdallah@unikraft.com>
@aabedraba
aabedraba temporarily deployed to pull-requests November 3, 2026 19:03 — with GitHub Actions Inactive
@github-actions
github-actions Bot temporarily deployed to pull-requests November 3, 2026 19:07 Inactive
@danielvallance

Copy link
Copy Markdown
Contributor

these commits were merged in (#366) right ?

@aabedraba

Copy link
Copy Markdown
Collaborator Author

Correct @danielvallance

@aabedraba aabedraba closed this Nov 4, 2026
@aabedraba
aabedraba deployed to pull-requests November 4, 2026 09:20 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
pull-requests — f414c90e Deployed Nov 4, 2026 by aabedraba via cleanup #1035
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants