Closed adrianthedev closed 2 years ago
Having same problem here. 🤚🏼
Any thoughts here? 👋
@adrianthedev
Sorry, I didn’t notice immediately, and thanks for using action-phpcs. I think it’s because parsing result of applying phpcs to your code failed, or phpcs itself could not be executed due to wrong writing of phpcs.xml. So, I would like you to check the work fine your phpcs.xml in your local environment. And if you’d like, please tell me your rules of phpcs and It helps to investigate the cause.
Hey @shirobrak, thanks for having a look a this.
I can confirm that my phpcs.xml
file is working on my local environment. It's also working with another GitHub PHPCS action I finally had to switch to.
If this can be helpful, here you have my file:
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WordPress Coding Standards" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>The Coding standard for the WordPress Coding Standards itself.</description>
<file>wp-content/themes/</file>
<!-- Exclude WordPress Core files from being checked. -->
<exclude-pattern>index.php</exclude-pattern>
<exclude-pattern>.history/*</exclude-pattern>
<!-- Exclude the Composer Vendor directory. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Exclude the Node Modules and dist directories. -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/dist/*</exclude-pattern>
<!-- Exclude Javascript files. -->
<exclude-pattern>*.js</exclude-pattern>
<rule ref="WordPress">
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralDomain" />
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
</rule>
<!-- Exclude filename conventions for Visual Composer templates -->
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>*/vc_templates/*</exclude-pattern>
</rule>
</ruleset>
@LucaPipolo @adrianthedev Sorry for my late response, and thank you for the phpcs.xml information. Checking, the cause was a lack of ruleset for checking WordPress Coding Style in Action's Running Environment. I added a ruleset and solved it. When I added a ruleset, I could confirm to check with WordPress Coding Style ruleset. I merged the fix in #13 , so it should have been resolved. Thank you for cooperation ! 👍
I get this output
parse error: Invalid numeric literal at line 1, column 6
when I run it withreporter: github-pr-review
. I'm using it on a pretty much standard laravel app.Thank you!