File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments