Skip to content

Commit 7f5d178

Browse files
authored
Merge pull request #674 from PHPCSStandards/feature/validate-xml-doc-wellformedness
GH Actions/basics: add check for valid XML docs + fix two docs
2 parents 204c963 + 12c11ba commit 7f5d178

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/validate.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ jobs:
7272
diff -B ./src/Standards/Squiz/ruleset.xml <(xmllint --format "./src/Standards/Squiz/ruleset.xml")
7373
diff -B ./src/Standards/Zend/ruleset.xml <(xmllint --format "./src/Standards/Zend/ruleset.xml")
7474
75+
# Validate the basic well-formedness of the Documentation XML files.
76+
- name: Validate documentation XML
77+
run: xmllint --noout ./src/Standards/*/Docs/*/*Standard.xml
78+
7579
yamllint:
7680
name: 'Lint Yaml'
7781
# Don't run the cronjob in this workflow on forks.

src/Standards/Generic/Docs/WhiteSpace/HereNowdocIdentifierSpacingStandard.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
]]>
66
</standard>
77
<code_comparison>
8-
<code title="Valid: No space between the <<< and the identifier string.">
8+
<code title="Valid: No space between the &lt;&lt;&lt; and the identifier string.">
99
<![CDATA[
1010
$heredoc = <em><<<EOD</em>
1111
some text
1212
EOD;
1313
]]>
1414
</code>
15-
<code title="Invalid: Whitespace between the <<< and the identifier string.">
15+
<code title="Invalid: Whitespace between the &lt;&lt;&lt; and the identifier string.">
1616
<![CDATA[
1717
$heredoc = <em><<< END</em>
1818
some text

src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function bar(<em>... </em>$spread) {
2525
);
2626
2727
bar(
28-
[<em>... </em>$foo ],<em>.../*comment*/</em>array_values($keyedArray)
28+
[<em>... </em>$foo ],<em>.../*@*/</em>array_values($keyed)
2929
);
3030
}
3131
]]>

0 commit comments

Comments
 (0)