-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Attempting to add support for PHP #37
Comments
Hmm, the problem here isn't obvious to me yet. I might have a go at adding this to the repo myself and credit you as the author. It looks okay, so it's probably some minor bug. |
Okay, let me know if there's something that needs to be changed. I would like to keep contributing. Great plugin. |
I have pushed your code now with some minor changes. |
Thanks for explaining those changes. I have the latest code, but I'm still Here's the code I'm using: <?php
echo "Hello!" // this needs a semi-colon
|
Ah, there is one bug left to be fixed which I can fix tomorrow. Some errors go one line beyond the last line in the file, so they don't appear at all. This is such an error. I'm thinking I might make that automatic for any linter which is added. |
@scwood If you pull again, you should see a warning for the missing semicolon now. I fixed errors which have line numbers beyond the end of the file for any linter now. |
Hmm, could you paste the output of I'll reopen the issue while you're having issues. |
Sure, here's the ouput of
And php:
|
Hi, for me Ale works fine with php files: php -v
PHP 7.0.11 (cli) (built: Sep 16 2016 18:52:44) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
Hmmm, I tried with Vim and NVim, no dice. Also tried with a minimal vimrc. |
I'm not quite certain where the problem lies at the moment. I might try installing that version of PHP tomorrow and see if there are any problems there. The PHP linting works for me at the moment. Have you checked the linters for other languages? I wonder if the problem is specific to the PHP linter. |
I have no idea what's going on with this. I've installed ale on my work computer and php works without any issues, I don't know why it's broken on my laptop. I've reinstalled vim, made sure I'm not running my forked version, etc. etc. I'm just going to close for now. |
@scwood I think I finally figured out what was going on. I tried the PHP linter on a friend's machine, and it was outputting the errors to stdout, whereas my machine outputs them to stderr. I added support to the plugin for reading from both streams, so it will just pick up all lines of output and parse them. This might be one of those things you can change in php.ini. Let me know if it works for you now. |
That did it, thanks so much. |
Nice! You're welcome. |
Hello, I am trying to add support for php with
php -l
. I've added a directory calledphp
toale_linters
and added a file calledphp.vim
.Here's my code so far:
When I run
cat myfile.php | php -l
I get sytnax errors. But in the buffer nothing shows up.The text was updated successfully, but these errors were encountered: