Skip to content

Add Vale for linting prose#67

Merged
razekmh merged 4 commits intomainfrom
vale
Jun 17, 2025
Merged

Add Vale for linting prose#67
razekmh merged 4 commits intomainfrom
vale

Conversation

@paddyroddy
Copy link
Copy Markdown
Member

@paddyroddy paddyroddy commented Jun 10, 2025

In this PR I add vale similarly to paddyroddy/talks#80, paddyroddy/talks#82, UCL-ARC/python-tooling#541. See this blog post for an explanation of what it is https://www.datadoghq.com/blog/engineering/how-we-use-vale-to-improve-our-documentation-editing-process. I used this extensively during my PhD https://github.com/paddyroddy/phd-thesis/blob/main/.vale.ini. I recently gave a talk about this in the Collaboration Hour, slides here: https://paddyroddy.github.io/talks/linting-prose-with-vale.

I have also fixed the few cases with the limited rules I've selected.

@paddyroddy paddyroddy self-assigned this Jun 10, 2025
@paddyroddy paddyroddy added enhancement New feature or request creative For art and story updates labels Jun 10, 2025
:: network-yes {"position":"1050,1050","size":"100,100"}
The wizard calls his familiar, a large fuzzy spider. It hands you a magical spider web which speeds up the process of cataloguing the spells.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VSCode didn't like this line ending

Comment thread story/choose-a-database.twee
Comment thread story/choose-a-database.twee
Comment thread story/choose-a-database.twee
Comment thread story/choose-a-database.twee
Comment thread .vale.ini
Comment on lines +7 to +8
[formats]
twee = md
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really sure what is best to do here. Vale has a section in the docs of file formats https://vale.sh/docs/formats/front-matter, we don't even need to have one (although some features won't work if we don't). Ideally .twee would be close to one of them, but I'm not sure if it is?

@paddyroddy paddyroddy requested a review from Copilot June 10, 2025 09:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates Vale for linting prose by adding a dedicated configuration, updating CI, and correcting a few style issues in existing story files.

  • Introduces a new .vale.ini to configure Vale, proselint, and write-good rules.
  • Adds a CI step in .github/workflows/linting.yaml to run Vale.
  • Cleans up redundant or awkward prose in choose-a-database.twee.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
story/choose-a-database.twee Streamlined repeated sentences and improved phrasing.
.vale.ini New Vale configuration: styles path, packages, disables.
.github/workflows/linting.yaml Added Vale linting GitHub Action step.
Comments suppressed due to low confidence (2)

.vale.ini:1

  • [nitpick] Add a comment at the top of .vale.ini to explain the purpose of this configuration and link to Vale documentation, which will help future maintainers understand and update these settings.
StylesPath = .github/styles

story/choose-a-database.twee:71

  • [nitpick] This description appears in multiple passages (explore-yes and text-no); consider extracting this repeated prose into a reusable passage or macro to reduce duplication and ease future updates.
A friendly looking elephant is drinking, and a dolphin pops its head above the water.

Comment thread .github/workflows/linting.yaml
@paddyroddy paddyroddy marked this pull request as ready for review June 10, 2025 09:24
Copy link
Copy Markdown
Contributor

@razekmh razekmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@razekmh razekmh merged commit 3508327 into main Jun 17, 2025
1 check passed
@razekmh razekmh deleted the vale branch June 17, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

creative For art and story updates enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants