-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Give original filename to phpcs #921
Comments
Please summarise the discussion in the issue you've referenced as far as it's relevant to Flycheck and elaborate why we need to drop standard input for phpcs. Ideally, try to produce a minimal example where phpcs behaves different as expected with Flycheck. |
There are phpcs rules that depends on the file location. <rule ref="Squiz.NamingConventions.ValidFunctionName">
<exclude-pattern>*/src/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
</rule> it tells to phpcs to exclude that rule when the path of the file being checked match the patterns. |
@choma Other syntax checkers (e.g. rubocop, eslint, etc.) solve this by accepting the name of the file as argument. Is that no option for phpcs? |
@choma phpcs 2.6 will provide an option When phpcs 2.6 is released will use this option to fix this issue. |
phpcs 2.6 is out now, I'll update the syntax checker definition soon. Note that this will implicitly drop support for any older phpcs release. |
@choma I've updated phpcs accordingly, the issue should be fixed now. Thanks for reporting it, and for your help with finding a proper solution! 👍 |
As explained here, using file path instead of STDIN allows phpcs to infer which rules should be excluded.
The text was updated successfully, but these errors were encountered: