Skip to content

Commit 1f20a94

Browse files
authored
textlint の導入 (#238)
* textlint-rules-prh 導入 * CIにTextlintを追加 * textlintエラー修正: 静的 → static
1 parent e3a4851 commit 1f20a94

File tree

8 files changed

+3314
-4
lines changed

8 files changed

+3314
-4
lines changed

.github/workflows/integrate.yaml

+56-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,21 @@ jobs:
1212
build:
1313
name: "Build"
1414

15-
runs-on: "ubuntu-20.04"
15+
runs-on: "ubuntu-24.04"
1616

1717
strategy:
1818
matrix:
1919
language:
2020
- "ja"
2121

2222
steps:
23+
- name: "Set up PHP"
24+
uses: "shivammathur/setup-php@v2"
25+
with:
26+
php-version: "8.3"
27+
extensions: "sqlite3"
28+
coverage: "none"
29+
2330
- name: "Checkout php/doc-${{ matrix.language }}"
2431
uses: "actions/checkout@v4"
2532
with:
@@ -39,5 +46,52 @@ jobs:
3946
path: "doc-base"
4047
repository: "php/doc-base"
4148

49+
- name: "Checkout php/phd"
50+
uses: "actions/checkout@v4"
51+
with:
52+
path: "phd"
53+
repository: "php/phd"
54+
4255
- name: "Build documentation for ${{ matrix.language }}"
43-
run: "php8.0 doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}"
56+
run: "php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}"
57+
58+
- name: "Render documentation for ${{ matrix.language }}"
59+
run: "php phd/render.php --docbook doc-base/.manual.xml --package PHP --format xhtml"
60+
61+
- name: "Save documentation for ${{ matrix.language }}"
62+
uses: "actions/upload-artifact@v4"
63+
with:
64+
name: "manual-html"
65+
path: "output/php-chunked-xhtml"
66+
retention-days: 7
67+
68+
textlint:
69+
name: "Textlint"
70+
71+
needs: ["build"]
72+
runs-on: "ubuntu-24.04"
73+
74+
steps:
75+
- name: "Checkout"
76+
uses: "actions/checkout@v4"
77+
78+
- name: "Install Node.js"
79+
uses: "actions/setup-node@v4"
80+
with:
81+
node-version: "22"
82+
cache: "npm"
83+
cache-dependency-path: "build/package-lock.json"
84+
85+
- name: "Download artifacts"
86+
uses: "actions/download-artifact@v4"
87+
with:
88+
name: "manual-html"
89+
path: "build/output"
90+
91+
- name: "Install textlint"
92+
run: "npm ci --no-audit"
93+
working-directory: "build"
94+
95+
- name: "Run textlint"
96+
run: "npx textlint --color ./output"
97+
working-directory: "build"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

appendices/migration84/other-changes.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
ビルドされる内容は、
290290
<filename class="headerfile">ibase.h</filename> 内の
291291
<constant>FB_API_VER</constant> の値によって変わります。
292-
この情報を取得するために新しい静的メソッド <methodname>Pdo\Firebird::getApiVersion</methodname>
292+
この情報を取得するために新しい static メソッド <methodname>Pdo\Firebird::getApiVersion</methodname>
293293
が追加されました。
294294
この情報は <function>phpinfo</function> からも参照できます。
295295
</simpara>

build/.textlintrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"plugins": [
3+
"html"
4+
],
5+
"rules": {
6+
"prh": {
7+
"rulePaths" :["prh.yml"]
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)