PHP Linter doesn't lint ALL the file


#1

Hello (or good night since it’s 2am where i’m writting this),

I’ve just installed linter-php for Atom. At first, it seemed to work fine but I realized that there’s something wrong. It only lints one error at a time.
For example, if I have an error at line 5 and an error at line 16, I will first be notified of the error at line 5 and will have to correct this error before I can see the other error.

And there’s something else that’s quite painfull about it. In the status bar it also tells me that I have 1 error in my code although I have more than one.

How do I fix this problem ? I looked it up on the Internet but can’t get any answer.

Thank you very much.


#2

php -l is only a simple syntax check, it exits on the first error it finds. There’s nothing that can be done about this unfortunately since it’s a limitation of php itself.


#3

Thank you anyway. I opened an issue on Github and I was told that I should install phpmd and/or phpcs.


#4

There’s the corresponding phpmd-linter and phpcs-linter packages.


#5

I can’t setup phpcs-linter… phpmd works fine…

I have no idea why… how can I debug it?


#6

Have you successfully installed phpcs?


#7

@DamnedScholar Yes, now I got both working! :slight_smile: