-
Notifications
You must be signed in to change notification settings - Fork 1.5k
"include-pattern" to file extensions #2486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've not run any tests, so what I about to say is unverified, but all the same.... By default PHPCS will scan files with the following extensions: Setting an As Using the below snippet in your ruleset, the <arg name="extensions" value="php,inc,phtml,js,css"/>
<rule ref="Company.Files.PhtmlValidation">
<exclude-pattern>*.php</exclude-pattern>
<include-pattern>*.phtml</include-pattern>
</rule> Also, please take note that the If that's not what you want, you need to make the patterns more specific. Example: <rule ref="Company.Files.PhtmlValidation">
<exclude-pattern>*\.php$</exclude-pattern>
<include-pattern>*\.phtml$</include-pattern>
</rule> |
This is correct. |
The option: <arg name="extensions" value="php,inc,phtml,js,css"/> works fine for me, thank you! |
Good news. Thanks for posting your solution. |
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to add an "include-pattern" in a specific rule, like that:
And running over this command:
And nothings happens.
But if I try with the command (with "--extensions=phtml"):
it gives me the result:
The "include-pattern" should not include the phtml files like specified in ruleset.xml?
The text was updated successfully, but these errors were encountered: