Skip to content

Commit 1d83d13

Browse files
authored
Update harper.yml
1 parent 8d39bb5 commit 1d83d13

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/harper.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,29 @@ jobs:
2424
--format json \
2525
> harper-report.json || true
2626
27-
- name: Show Harper Report
28-
run: cat harper-report.json
27+
- name: Extract Spelling Candidates
28+
run: |
29+
python - <<'PY'
30+
import json
31+
32+
with open("harper-report.json", encoding="utf-8") as f:
33+
reports = json.load(f)
34+
35+
words = set()
36+
for report in reports:
37+
for lint in report.get("lints", []):
38+
if lint.get("kind") == "Spelling":
39+
word = lint.get("matched_text")
40+
if word:
41+
words.add(word)
42+
43+
print("Suggested dictionary candidates:")
44+
for word in sorted(words, key=str.lower):
45+
print(word)
46+
PY
2947
3048
- name: Run Harper
3149
run: |
3250
find docs src/pages -type f \( -name "*.md" -o -name "*.mdx" \) -print0 | \
3351
xargs -0 harper-cli lint \
34-
--user-dict-path ./.harper-dictionary.txt || true
52+
--user-dict-path ./.harper-dictionary.txt || true

0 commit comments

Comments
 (0)