PHP linter config with -l in Notepad++
Did I miss something?
For 2 years now, when writing code and after saving the php scripts with that code, I dig for particular folder full of a growing number of .bat file scripts each containing a windows command that runs php linter against the aforementioned PHP scripts to find PHP syntax errors --one script at a time -one syntax error at a time. The scripts take only a minute or two but after years it starts to annoy. Yes I searched and tried many suggestions but no dice. If I missed something plain to see just tell me. Funny thing is I had it working years ago. Can’t recall what I did.
I tried configuring php linter using the plugin NppExec. No dice. The -l option prints a syntax error message the moment you type it, right? If you have it config’ed and working a screenshot with the precise config syntax would help.
PeterJones last edited by
-loption in Notepad++ just tells Notepad++ what language to use for syntax highlighting.
NppExec can easily run an external linter on your active file. If you show your NppExec script, someone here can probably explain why it’s not doing what you want.
A CMD script per php file DOS windows etc etc -see above post
Now It is easier for me to lint (syntax check PHP using nppexec. Hit F6, smack a couple arrows keys then slam down the the Enter key and the error displays at the bottom of notepad++ Thx Peter. You didn’t have much detail but you implied it easy. IT was.
I had php linter installed and configured in notepad++ years ago such that the instant you inserted a typo, php flashed the syntax error in the console at the bottom without having to save the file or punch a single button. Anybody know how I got that working.??
If not, how can I assign a single button to lint a php sciript? A trivial issue? After repeating a trivial task a million times it might annoy you.
Alan Kilborn last edited by
@scott-moore said in PHP linter config with -l in Notepad++:
I had php linter installed and configured in notepad++ years ago such that the instant you inserted a typo, php flashed the syntax error in the console at the bottom without having to save the file or punch a single button.
THAT seems ambitious. I’d think that unless something was super-highly integrated, that it would be taking a brute force method of linting the entire file on every keystroke/cut/paste/delete.
I just have my Python syntax checker running on every save; no extra keystroke involved because saving often is good (and so is syntax checking). :-)
Mine runs via a PythonScript using that plugin. You could consider that to invoke what you need, or if you’re not a big fan of Python, maybe the NppExec plugin meets your need better.
@alan-kilborn Good advice. It’s good enough the way it is