-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.24 KB
/
Copy pathno-emdash.yml
File metadata and controls
40 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: No em dashes
# Fails a PR that introduces an em dash (U+2014) or en dash (U+2013) into any tracked text file. The repo style forbids
# them: use a colon, or reword the sentence, instead (see CLAUDE.md). A spaced ASCII hyphen stand-in is banned too, caught by
# tools/dash-lint. This check is a fast grep over tracked files, so
# it runs unconditionally rather than behind a changed-paths gate: an em dash can land in any text file, not a fixed set.
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
no-emdash:
name: No em dashes
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: false
- name: Check for em/en dashes in tracked files
run: bash tools/lint-no-emdash.sh
- name: Check for spaced-hyphen em dashes in prose, comments, and strings
run: git ls-files -z | go run ./tools/dash-lint