Skip to content

chore: add Vale docs linter for consistent writing - #175

Draft
weboko wants to merge 2 commits into
masterfrom
chore-vale-linter
Draft

weboko wants to merge 2 commits into
masterfrom
chore-vale-linter

Conversation

@weboko

@weboko weboko commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #174.

Adds Vale with a small Lambda style to keep prize specs and repo docs consistent, and fixes every existing violation.

Rules (.github/vale/Lambda/)

  • License: dual licensing is written "MIT and Apache-2.0", never "or" or "/".
  • Amount: prize amounts are written $1500. No thousands separator ($1,200, $1.200), no USD prefix or suffix, no k.
  • Dash: no em or en dashes. Use - or : instead.

Scope (.vale.ini)

prizes/*.md, README.md, TERMS.md, PRIVACY_POLICY.md and the solutions/LP-0000.md template. Submitted solutions are the submitter's own writing and aren't linted. Code spans and code blocks are skipped.

CI (.github/workflows/lint-docs.yml)

  • Runs errata-ai/vale-action@v3 (Vale pinned to 3.24.0) on pull requests with a read-only token.
  • Problems are marked on the PR diff, including for fork PRs.
  • fail_on_error: true: any error fails the check. It only blocks merging if Lint Docs is made a required check in branch protection.
  • Only lines the PR adds are reported, so an older mistake already on master can't fail an unrelated PR.

Fixes to existing content

  • About 190 spaced em/en dashes replaced with - across prizes/, README, TERMS, PRIVACY_POLICY, the solution template and the payment issue template. This touches a few visible strings: the TERMS/PRIVACY_POLICY titles, the issue template name/title ("Lambda Prize - payment") and the suggested solution PR title.
  • Ten "Total Prize" amounts reformatted, e.g. $1,200 → $1200 and $20,000 → $20000.
  • validate-submission.sh said "Must be MIT or Apache-2.0" in two messages. It now says "Must be MIT and Apache-2.0 (dual licensed)".
  • README explains the rules and how to run vale . locally.

Testing

  • Locally (Vale 3.24.0): 0 errors across the 25 files in scope.
  • A test file with 10 bad samples was fully flagged, and 5 correct samples (including USDT and an amount inside a code span) passed.
  • Dashes injected into README, a prize file and the template were caught; one in a submitted solution was ignored.
  • The workflow itself runs for the first time on this PR.

🤖 Generated with Claude Code

weboko and others added 2 commits October 2, 2026 01:03
Adds a Vale config (.vale.ini) with a Lambda style in .github/vale/ and
a Lint Docs workflow that runs it on PRs and pushes to master. Rules
apply to maintainer-owned markdown (prizes/, README, TERMS,
PRIVACY_POLICY, the solution template); submitted solutions are skipped.

- Lambda.License: "MIT and Apache-2.0", never "or" or "/"
- Lambda.Amount: amounts written as $1500 (no separator, USD, or k)
- Lambda.Dash: no em or en dashes; use " - " instead

Fixes all existing violations, including the validator messages that
said "Must be MIT or Apache-2.0".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Use errata-ai/vale-action instead of a hand-rolled install and jq
annotation step. Its default reporter annotates fork PRs without write
access, and filter_mode=added means only lines a PR adds are reported.
Drop the push trigger, which has no diff to filter against.

Collapse .vale.ini to a single section listing the linted files instead
of enabling everything and switching solutions/ back off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

❌ Validation failed

Fix before review:

  • ❌ Wrong title. Rename to Solution: LP-0000 <description>.
  • ❌ Solution PRs must only touch solutions/. Outside files: .github/ISSUE_TEMPLATE/lambda-prize-claim.yml .github/scripts/validate-submission.sh .github/vale/Lambda/Amount.yml .github/vale/Lambda/Dash.yml .github/vale/Lambda/License.yml .github/workflows/lint-docs.yml .vale.ini PRIVACY_POLICY.md README.md TERMS.md prizes/LP-0000.md prizes/LP-0001.md prizes/LP-0002.md prizes/LP-0003.md prizes/LP-0004.md prizes/LP-0005.md prizes/LP-0008.md prizes/LP-0009.md prizes/LP-0010.md prizes/LP-0011.md prizes/LP-0012.md prizes/LP-0013.md prizes/LP-0014.md prizes/LP-0015.md prizes/LP-0016.md prizes/LP-0017.md prizes/LP-0018.md prizes/LP-0021.md prizes/LP-0022.md prizes/LP-0023.md prizes/LP-0026.md.
  • ❌ Repo link is still a placeholder.
  • ❌ "Submitted by" is still a placeholder.

Warnings (non-blocking):

  • ⚠️ Unfilled placeholders: LP-XXXX <Short Description>.
  • ⚠️ No criteria marked met ([x]).
  • ⚠️ ### Functionality: only template prompt text. Fill in your assessment.
  • ⚠️ ### Usability: only template prompt text. Fill in your assessment.
  • ⚠️ ### Reliability: only template prompt text. Fill in your assessment.
  • ⚠️ ### Performance: only template prompt text. Fill in your assessment.
  • ⚠️ ### Supportability: only template prompt text. Fill in your assessment.
  • ⚠️ A solution for LP-0000 already exists on base.

Automated check. See solution template and TERMS.

@weboko
weboko marked this pull request as draft October 1, 2026 23:26
@weboko

weboko commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

experimenting here

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.

chore: linter

1 participant