|
20 | 20 | runs-on: ubuntu-latest
|
21 | 21 |
|
22 | 22 | env:
|
23 |
| - XMLLINT_INDENT: ' ' |
24 | 23 | # - COMPOSER_ROOT_VERSION is needed to get round the recursive dependency when using CI.
|
25 | 24 | COMPOSER_ROOT_VERSION: '1.99.99'
|
26 | 25 |
|
|
73 | 72 | - name: Validate rulesets against schema
|
74 | 73 | run: xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd ./*/ruleset.xml
|
75 | 74 |
|
76 |
| - # Check the code-style consistency of the XML ruleset files. |
77 |
| - - name: Check XML code style |
78 |
| - run: | |
79 |
| - diff -B ./Modernize/ruleset.xml <(xmllint --format "./Modernize/ruleset.xml") |
80 |
| - diff -B ./NormalizedArrays/ruleset.xml <(xmllint --format "./NormalizedArrays/ruleset.xml") |
81 |
| - diff -B ./Universal/ruleset.xml <(xmllint --format "./Universal/ruleset.xml") |
82 |
| -
|
83 | 75 | # Validate the Documentation XML files.
|
84 | 76 | - name: Validate documentation against schema
|
85 | 77 | run: xmllint --noout --schema vendor/phpcsstandards/phpcsdevtools/DocsXsd/phpcsdocs.xsd ./*/Docs/*/*Standard.xml
|
|
99 | 91 | - name: Check sniff feature completeness
|
100 | 92 | run: composer check-complete
|
101 | 93 |
|
| 94 | + xml-cs: |
| 95 | + name: 'XML Code style' |
| 96 | + runs-on: ubuntu-latest |
| 97 | + |
| 98 | + env: |
| 99 | + XMLLINT_INDENT: ' ' |
| 100 | + |
| 101 | + steps: |
| 102 | + - name: Checkout code |
| 103 | + uses: actions/checkout@v4 |
| 104 | + |
| 105 | + # Updating the lists can fail intermittently, typically after Microsoft has released a new package. |
| 106 | + # This should not be blocking for this job, so ignore any errors from this step. |
| 107 | + # Ref: https://github.com/dotnet/core/issues/4167 |
| 108 | + - name: Update the available packages list |
| 109 | + continue-on-error: true |
| 110 | + run: sudo apt-get update |
| 111 | + |
| 112 | + - name: Install xmllint |
| 113 | + run: sudo apt-get install --no-install-recommends -y libxml2-utils |
| 114 | + |
| 115 | + # Show XML violations inline in the file diff. |
| 116 | + - name: Enable showing XML issues inline |
| 117 | + uses: korelstar/xmllint-problem-matcher@v1 |
| 118 | + |
| 119 | + # Check the code-style consistency of the XML ruleset files. |
| 120 | + - name: Check XML code style |
| 121 | + run: | |
| 122 | + diff -B ./Modernize/ruleset.xml <(xmllint --format "./Modernize/ruleset.xml") |
| 123 | + diff -B ./NormalizedArrays/ruleset.xml <(xmllint --format "./NormalizedArrays/ruleset.xml") |
| 124 | + diff -B ./Universal/ruleset.xml <(xmllint --format "./Universal/ruleset.xml") |
| 125 | +
|
102 | 126 | phpstan:
|
103 | 127 | name: "PHPStan"
|
104 | 128 | uses: PHPCSStandards/.github/.github/workflows/reusable-phpstan.yml@main
|
|
0 commit comments