Closed JamesCoyle closed 7 years ago
To get this working on Windows you need to create a wrapper batch file that executes cpplint.py
through Python, passing in the arguments to it. Then set the full path to that script as the executable path option.
cpplint.py
seems to be running via python. I swear I had this running before without having to change any settings or do anything. I just installed python, installed linter-cpplint and it worked no problem.
Hmmm, actually if you had previously added .py
to your PATHEXT
then that would explain how it was working before "no problem". There was a bug in a dependency used to actually perform the execution that could have broken this.
To fix that, if that is the issue, go through the following:
C:\Users\Solus\.atom\packages
and delete/move all linter-____
folders, making sure to note the namesapm install linter-name1 linter-name2 ...
to run a fresh install of the packages previously removedThis should force all the sub-dependencies to be the latest allowed version, bringing in the fixed version of sb-exec
.
Same here on windows. This linter fails to properly launch the process because it tries to launch a script and not an executable. This can be fixed by changing this code here to this one:
parameters.splice(0, 0, @cpplintPath)
return helpers
.exec('python', parameters, stream: 'stderr').then (result) ->
The other solution is placing a .bat
or .cmd
file in the same directory as the python script with the following content and referencing it in the plugin config:
python %~dp0cpplint.py %*
The odd thing about all of this is when you install cpplint
, it should have already created a cpplint.exe
in your Scripts
folder. What do you get from running where.exe cpplint
? It should be similar to C:\Python27\Scripts\cpplint.exe
.
My issue at the moment is that I uninstalled it but Atom still thinks it's installed. It won't uninstall it because there aren't any files to uninstall and it doesn't let me install it as it thinks it's installed already. I don't remember if I actually installed python before installing Atom though so that might be why it didn't install the executable in the right place.
Eh.... install cpplint? I just downloaded the python file. I didn't really find any download for some kind of installer.
@olee Ah, pip install cpplint
will install it properly and setup all the standard wrapper scripts. If you are manually downloading the .py file you would need to create the wrapper like you mentioned.
@JamesCoyle I'm not entirely sure what you mean by "it", if you mean this package then simply close Atom and delete the C:\Users\Solus\.atom\packages\linter-cpplint
folder.
Managed to get this working again now. Not sure what issue I was having that wouldn't let me install it again but that seems to be fixed now. I've now just set the executable path to be C:\Python27\Scripts\cpplint.exe
which works fine. The batch file method also works.
Seem to be having quite a few issues getting this to work. :/