AtomLinter / linter-cpplint

Linter plugin for c++, using cpplint
https://atom.io/packages/linter-cpplint
MIT License
6 stars 5 forks source link

When I open a cpp file, error message that says "[Linter] Error running cpplint" popped up. #72

Closed aichaku closed 6 years ago

aichaku commented 7 years ago

The developer tool emitted the error below even though the package is right there.

C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159 [Linter] Error running cpplint Error: Failed to spawn command `cpplint`. Make sure `cpplint` is installed and on your PATH(…)(anonymous function) @ C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159
C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159 [Linter] Error running cpplint Error: Failed to spawn command `cpplint`. Make sure `cpplint` is installed and on your PATH(…)(anonymous function) @ C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159
C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159 [Linter] Error running cpplint Error: Failed to spawn command `cpplint`. Make sure `cpplint` is installed and on your PATH(…)(anonymous function) @ C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159
C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159 [Linter] Error running cpplint Error: Failed to spawn command `cpplint`. Make sure `cpplint` is installed and on your PATH(…)(anonymous function) @ C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159
C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159 [Linter] Error running cpplint Error: Failed to spawn command `cpplint`. Make sure `cpplint` is installed and on your PATH(…)(anonymous function) @ C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159
C:\Users\212560690\.atom\packages\linter\lib\linter-registry.js:159 [Linter] Error running cpplint Error: Failed to spawn command `cpplint`. Make sure `cpplint` is installed and on your PATH(…)
KZABORSKI commented 7 years ago

Got the same problem. Did you manage to get it sorted? Windows 10

Arcanemagus commented 7 years ago

As the error is telling you you need to have cpplint installed on your system and available in the %PATH% (or manually specified in the settings) for this package to work.

KZABORSKI commented 7 years ago

Already done that, hence the question

Arcanemagus commented 7 years ago

If you did, you wouldn't be getting that message in the console 😛.

What do you get when you run where.exe cpplint in a console (PowerShell, cmd.exe)?

omichel commented 6 years ago

Same problem here. From a cmd.exe console (and also from the MSYS2 console) where cpplint gives me:

D:\Python36\Scripts\cpplint.exe

I installed cpplint with pip install cpplint (with Python 3.6). I can start cpplint from a cmd.exe console without any problem (also from the MSYS2 terminal). But atom still complains:

[Linter] Error running cpplint Error: Failed to spawn command `cpplint`. Make sure `cpplint` is installed and on your PATH at C:\Users\Olivier\.atom\packages\linter-cpplint\node_modules\atom-linter\lib\helpers.js:102:24

I also tried the same with Python 2.7 with the same bad result.

omichel commented 6 years ago

I found a solution by setting the full path to cpplint (e.g. D:\Python36\Scripts\cpplint) in atom settings... Not very nice, but it works.

Arcanemagus commented 6 years ago

If you close all instances of Atom, then launch it from the shell where cpplint works, does it work without the setting?

omichel commented 6 years ago

That's what I did. I closed Atom and relaunched it from the shell where cpplint works and I always got the same error (Failed to spawn command cpplint...).

aichaku commented 6 years ago

Thanks for your comment. It just slipped my mind that I opened this issue. I'll close right away.