Comments (17)
@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.
from ale.
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.
from ale.
Okay, let me know if there's something that needs to be changed. I would like to keep contributing. Great plugin.
from ale.
I have pushed your code now with some minor changes. php
needed --
instead of -
to read from stdin, which is a bit odd, but it works. The second error was that the regex matches start at index 1
, and not 0
. That's a common mistake, which I didn't notice until I started playing around with it.
from ale.
Thanks for explaining those changes. I have the latest code, but I'm still
not seeing any linting feedback in my buffer.
Here's the code I'm using:
<?php
echo "Hello!" // this needs a semi-colon
I have pushed your code now with some minor changes. php needed --
instead of - to read from stdin, which is a bit odd, but it works. The
second error was that the regex matches start at index 1, and not 0.
That's a common mistake, which I didn't notice until I started playing
around with it.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#37 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AItA-uQz2tUR1g2lsaqevcls4XOqXFraks5qwY10gaJpZM4KNHXm
.
from ale.
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.
from ale.
@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.
from ale.
I'm not sure what I'm doing wrong. I'm updated to the latest code. On the left with the C file Ale is working great, but on the php file nothing happens:
from ale.
Hmm, could you paste the output of :!php -l -- < test.php
and your php
version? Maybe there is something wrong there.
I'll reopen the issue while you're having issues.
from ale.
Sure, here's the ouput of :!php -l -- < test.php
:
Parse error: parse error, expecting `','' or `';'' in - on line 4
Errors parsing -
shell returned 255
Press ENTER or type command to continue
And php:
$ php --version
PHP 5.5.36 (cli) (built: May 29 2016 01:07:06)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
from ale.
Hi, for me Ale works fine with php files:
https://asciinema.org/a/2h6zlyi99ialjdeia9gmiwteo
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
from ale.
Hmmm, I tried with Vim and NVim, no dice. Also tried with a minimal vimrc.
from ale.
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.
from ale.
Yeah no issues using the other linters... I updated my plugin this morning. Still digging
from ale.
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.
from ale.
That did it, thanks so much.
from ale.
Nice! You're welcome.
from ale.
Related Issues (20)
- :ALRename doesn't include $ characters in input
- yamlfix configuration options are not used
- Document and support loading with lazy.nvim HOT 1
- Markdown hover text without language spec keep code fences
- The linter generates .plist files again HOT 2
- ale_virtualtext, ale_sign and highlight color shows abnormal in nvim HOT 1
- Stylelint 16.0.0+ not outputting inline errors with ale HOT 1
- Eclipse Code Actions are no-ops.
- Last update broke chktex linting for LaTeX it is needed to go back to reflog HEAD@{5} to have it back. HOT 9
- Ruff always raises E474: Unidentified byte and E474: Failed to parse bash on ALELint
- Errors when opening fugitive.vim buffers (diff, staged, specific commit versions, etc) HOT 1
- Check ruff version for compatibility with ALE
- Add support for vera++ checker
- Should python `ruff` fixer default to pass `--no-fix` on newer versions?
- cspell incorrectly configured for latex input files HOT 7
- There is no fixer named `cpplint`. HOT 1
- Asymptote support
- Disable latex check in asy environments
- Omnicompletion triggers linting
- Use hamllint as a fixer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ale.