-
Notifications
You must be signed in to change notification settings - Fork 3
No PHP code found - short open tags #140
Comments
No, you're correct it shouldn't be doing that, it looks like in testing this out it happens on .js files as well. In the mean time if you wish to suppress those warnings you can check the box "Check Only PHP Files." Thanks for letting us know! |
Ah, didn't think it was supposed to do that :) Cheers! |
It looks like this can be closed as it deals with the upstream WPTRT/WPThemeReview , I went ahead and pushed a fix for it there, so the next release should get it squared away! In terms of the This repo is using 1.2.1 of WPCS as of now, so the |
Awesome! ...and thanks. |
No problem! Just as some insight into this issue from what I've seen so far - for others who might look at this: I did go through testing out a mostly unmodified Runner class in place of our custom runner. In doing this it does appear that PHPCS was detecting and skipping the minfied files it couldn't handle when they were ran through the Files\FileList class, and the PHP code/short open tags error no longer appears, and the report notes files that were skipped. It's a relatively large repo filewise, and I did notice files that weren't minified which were skipped (possibly due to size?). I see a few benefits to using Esprima - it's meant for JS, it catches actual issues that could cause errors in the scripts execution. PHPCS is just tokenizing and running sniffs, but comparing the same file through each sniffing it - Esprima catches real syntax errors, and I have yet to see anything relevant from PHPCS - other than that it skipped a file that it couldn't tokenize for no specific reason given. |
When doing a theme check with the latest 1.0.0 version of Theme Sniffer, I am getting these warnings for every stylesheet:
Is this a bug or something else?
The text was updated successfully, but these errors were encountered: