Skip to content
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

[Feature] Switch to phpl #5

Open
joeldbirch opened this issue Oct 10, 2014 · 2 comments
Open

[Feature] Switch to phpl #5

joeldbirch opened this issue Oct 10, 2014 · 2 comments

Comments

@joeldbirch
Copy link

Hello,

I've never used PHPlint before and I'm trying to get started with grunt-phplint. I have it checking my files correctly and the command line outputs ">> 43 files php linted. Done, without errors.". However, when I put one of those PHP files through the online PHPlint GUI it shows me plenty of errors (as I expected).

Where should I expect to see the errors generated by grunt-phplint? I assume I'm not setting up the config for grunt-phplint correctly. Do I need to state which lint options to test against? Is there anywhere I can see how to do this? My Google-fu is failing me and I can't find any straight forward directions to get me up and running. Here is my (coffeescript) config block for grunt-phplint:

        phplint:
            options:
                phpCmd: '/Applications/MAMP/bin/php/php5.4.26/bin/php'
            good: [
                '**/*.php'
                '!node_modules/**/*.php'
            ]

I'm just running grunt phplint:good for the moment.

Any info you could provide me to get me on track would be most appreciated. Thanks.

@jgable
Copy link
Owner

jgable commented Oct 10, 2014

That online site is probably using a different program to check the php files. If you can find out what they are using maybe we can use it here.

For right now all we use is php -l <filepath> on each file that is matched in the glob. I believe it's just a really basic syntax checker, nothing related to style.

@joeldbirch
Copy link
Author

I see, thanks for the explanation. I assumed you were using this PHPLint project which provides both a command line tool phpl and a GUI, which is what I linked to earlier. The project looks well maintained and they just released PHPLint v2. The feedback their GUI tool provides is really interesting and useful - it would be amazing if you could have a look at maybe folding the phpl command line stuff into grunt-phplint. Cheers!

@jgable jgable changed the title Looking for further explanation of how to get started [Feature] Switch to phpl Nov 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants