Skip to content

Commit 47c16c2

Browse files
authored
Update checkdocs.yml
1 parent 183ffea commit 47c16c2

1 file changed

Lines changed: 53 additions & 68 deletions

File tree

.github/workflows/checkdocs.yml

Lines changed: 53 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ name: 'Docs'
1515
paths:
1616
- '.github/workflows/checkdocs.yml'
1717
- '.github/scripts/**'
18-
- '.github/scripts/mdlinkcheck'
19-
- '/scripts/**'
18+
- 'scripts/**'
2019
- '**.md'
2120
- 'docs/*'
2221
pull_request:
@@ -25,8 +24,7 @@ name: 'Docs'
2524
paths:
2625
- '.github/workflows/checkdocs.yml'
2726
- '.github/scripts/**'
28-
- '.github/scripts/mdlinkcheck'
29-
- '/scripts/**'
27+
- 'scripts/**'
3028
- '**.md'
3129
- 'docs/*'
3230

@@ -37,76 +35,63 @@ concurrency:
3735
permissions: {}
3836

3937
jobs:
40-
# proselint:
41-
# name: 'proselint'
42-
# runs-on: ubuntu-latest
43-
# steps:
44-
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
45-
# with:
46-
# persist-credentials: false
47-
#
48-
# - name: 'install prereqs'
49-
# run: |
50-
# sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
51-
# sudo apt-get -o Dpkg::Use-Pty=0 update
52-
# sudo rm -f /var/lib/man-db/auto-update
53-
# sudo apt-get -o Dpkg::Use-Pty=0 install python3-proselint
54-
#
55-
# # config file help: https://github.com/amperser/proselint/
56-
# - name: 'create proselint config'
57-
# run: |
58-
# cat <<JSON > ~/.proselintrc.json
59-
# {
60-
# "checks": {
61-
# "typography.diacritical_marks": false,
62-
# "typography.symbols": false,
63-
# "annotations.misc": false,
64-
# "security.password": false,
65-
# "misc.annotations": false
66-
# }
67-
# }
68-
# JSON
69-
#
70-
# - name: 'trim headers off all *.md files'
71-
# run: git ls-files '*.md' -z | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl
72-
#
73-
# - name: 'check prose'
74-
# run: git ls-files '*.md' -z | grep -Evz 'CHECKSRC\.md|DISTROS\.md|curl_mprintf\.md|CURLOPT_INTERFACE\.md|interface\.md' | xargs -0 proselint -- README
75-
#
76-
# # This is for CHECKSRC and files with aggressive exclamation mark needs
77-
# - name: 'create second proselint config'
78-
# run: |
79-
# cat <<JSON > ~/.proselintrc.json
80-
# {
81-
# "checks": {
82-
# "typography.diacritical_marks": false,
83-
# "typography.symbols": false,
84-
# "typography.exclamation": false,
85-
# "lexical_illusions.misc": false,
86-
# "annotations.misc": false
87-
# }
88-
# }
89-
# JSON
90-
#
91-
# - name: 'check special prose'
92-
# run: proselint docs/internals/CHECKSRC.md docs/libcurl/curl_mprintf.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
93-
94-
linkcheck:
95-
name: 'linkcheck'
38+
# config file help: https://github.com/amperser/proselint/
39+
proselint:
40+
name: 'proselint'
9641
runs-on: ubuntu-latest
9742
steps:
98-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
43+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9944
with:
10045
persist-credentials: false
10146

102-
- name: 'mdlinkcheck'
103-
run: ./scripts/mdlinkcheck
47+
- name: 'install prereqs'
48+
run: |
49+
python3 -m venv ~/venv
50+
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r .github/scripts/requirements-proselint.txt
51+
52+
- name: 'trim headers off all *.md files'
53+
run: git ls-files '*.md' -z | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl
54+
55+
- name: 'check prose'
56+
run: |
57+
cat <<JSON > ~/.proselintrc.json
58+
{
59+
"checks": {
60+
"annotations.misc": false,
61+
"lexical_illusions": false,
62+
"misc.annotations": false,
63+
"redundancy.misc.garner": false,
64+
"security.password": false,
65+
"spelling.ve_of": false,
66+
"typography.diacritical_marks": false,
67+
"typography.symbols": false
68+
}
69+
}
70+
JSON
71+
source ~/venv/bin/activate
72+
git ls-files README '*.md' -z | grep -Evz '(CHECKSRC|DISTROS|CURLOPT_INTERFACE|interface)\.md' | xargs -0 proselint check --
73+
74+
- name: 'check special prose' # For CHECKSRC and files with aggressive exclamation mark needs
75+
run: |
76+
cat <<JSON > ~/.proselintrc.json
77+
{
78+
"checks": {
79+
"annotations.misc": false,
80+
"lexical_illusions": false,
81+
"typography.diacritical_marks": false,
82+
"typography.punctuation.exclamation": false,
83+
"typography.symbols": false
84+
}
85+
}
86+
JSON
87+
source ~/venv/bin/activate
88+
proselint check docs/internals/CHECKSRC.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
10489
10590
pyspelling:
10691
name: 'pyspelling'
10792
runs-on: ubuntu-latest
10893
steps:
109-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
94+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
11095
with:
11196
persist-credentials: false
11297

@@ -135,12 +120,12 @@ jobs:
135120
name: 'badwords, synopsis'
136121
runs-on: ubuntu-latest
137122
steps:
138-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
123+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
139124
with:
140125
persist-credentials: false
141126

142127
- name: 'badwords'
143-
run: .github/scripts/badwords.pl '**.md' docs/TODO docs/KNOWN_BUGS packages/OS400/README.OS400 < .github/scripts/badwords.txt
128+
run: .github/scripts/badwords.pl -w .github/scripts/badwords.ok '**.md' packages/OS400/README.OS400 < .github/scripts/badwords.txt
144129

145130
- name: 'verify synopsis'
146131
run: .github/scripts/verify-synopsis.pl docs/libcurl/curl*.md
@@ -149,7 +134,7 @@ jobs:
149134
name: 'man-examples'
150135
runs-on: ubuntu-latest
151136
steps:
152-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
137+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
153138
with:
154139
persist-credentials: false
155140

@@ -161,7 +146,7 @@ jobs:
161146
runs-on: ubuntu-24.04-arm
162147
timeout-minutes: 5
163148
steps:
164-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
149+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
165150
with:
166151
persist-credentials: false
167152

0 commit comments

Comments
 (0)