8000 Add Vale for content linting to the repo (#541) · UCL-ARC/python-tooling@cdc5faa · GitHub
[go: up one dir, main page]

Skip to content

Commit cdc5faa

Browse files
paddyroddyCopilotpre-commit-ci[bot]samcunliffematt-graham
authored
Add Vale for content linting to the repo (#541)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sam Cunliffe <samcunliffe@users.noreply.github.com> Co-authored-by: Matt Graham <matthew.m.graham@gmail.com>
1 parent 5865e38 commit cdc5faa

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

.github/workflows/linting.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,17 @@ jobs:
5959
git add .
6060
pre-commit run --all-files --color always --verbose
6161
working-directory: cookie-template/python-template
62+
63+
lint-prose:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout source
67+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
68+
69+
- name: Run Vale
70+
uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
filter_mode: nofilter
75+
reporter: github-check

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@
77
python-template
88

99
*.DS_Store
10+
11+
# https://vale.sh/docs/keys/packages#vcs
12+
.github/styles/*
13+
!.github/styles/config/
14+
.github/styles/config/*
15+
!.github/styles/config/vocabularies/
16+
.github/styles/config/vocabularies/*
17+
!.github/styles/config/vocabularies/Base

.vale.ini

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
StylesPath = .github/styles
2+
3+
# https://github.com/errata-ai/packages
4+
Packages = proselint,\
5+
write-good
6+
7+
[*.md]
8+
BasedOnStyles = proselint,\
9+
Vale,\
10+
write-good
11+
12+
# Disable
13+
Vale.Spelling = NO
14+
write-good.E-Prime = NO
15+
write-good.Passive = NO
16+
write-good.TooWordy = NO
17+
18+
# Ignore lines starting with GitHub alerts syntax
19+
BlockIgnores = (?s)> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\](\n|$)
20+
21+
# `vale sync` in CI means the packages are then linted, so turn them off
22+
[.github/styles/**]
23+
BasedOnStyles =
24+
25+
# Don't modify generated files
26+
[**/{CODE_OF_CONDUCT,LICENSE}*]
27+
BasedOnStyles =

tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Once you have activated the environment you should make sure the version of the
270270
python -m pip install --upgrade pip
271271
```
272272

273-
Similar to `uv`, once the the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running
273+
Similar to `uv`, once the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running
274274

275275
```sh
276276
python -m pip install --editable ".[dev,docs,test]"

0 commit comments

Comments
 (0)
0