Skip to content

Commit be74445

Browse files
committed
Run linting/fixing before compare
1 parent 7b2cf10 commit be74445

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/verify-docs.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ jobs:
2828
run: |
2929
# Create temp directory for fresh docs
3030
mkdir -p temp/code-reference
31-
# Generate fresh documentation
32-
php docs/bin/generate-parsed-md.php --output=temp/code-reference
31+
32+
# Run full docs workflow with new output directory
33+
DOCS_OUTPUT_DIR=temp/code-reference composer run docs
3334
3435
- name: Compare documentation
3536
run: |
3637
# Compare generated docs with existing docs
37-
if ! diff -r --ignore-all-space --ignore-blank-lines docs/code-reference temp/code-reference; then
38+
if ! diff -r --ignore-all-space --ignore-blank-lines --ignore-matching-lines='^<https.*>$' docs/code-reference temp/code-reference; then
3839
echo "::error::Documentation in docs/code-reference does not match what would be generated from source code."
39-
echo "::error::Please update the source code documentation instead of modifying the generated files directly."
40+
echo "::error::The markdown files are generated from PHP docblocks - please update the source code documentation instead."
4041
exit 1
4142
fi

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"docs:manifest": "php docs/bin/generate-manifest.php",
2525
"docs:links": "php docs/bin/update-markdown-links.php",
26-
"docs:parse": "php docs/bin/generate-parsed-md.php",
26+
"docs:parse": "php docs/bin/generate-parsed-md.php --output=${DOCS_OUTPUT_DIR:-docs/code-reference}",
2727
"docs:fix": "npm run fix:md",
2828
"docs:lint": "npm run lint:md",
2929
"docs": [

docs/bin/generate-parsed-md.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function generate() {
158158
*/
159159
private function process_file( $file ) {
160160
$code = file_get_contents( $file->getRealPath() );
161-
$ast = $this->parser->parse( $code );
161+
$ast = $this->parser->Parse( $code );
162162

163163
if ( ! $ast ) {
164164
return;

0 commit comments

Comments
 (0)