SublimeLinter cppcheck linter executable not found

浪子不回头ぞ 提交于 2019-12-24 01:48:40

问题


I have intalled SublimeLinter and sublimelinter-cppcheck packages to my Sublime Text 3.

The problem is that sublime text is saying SublimeLinter: WARNING: cppcheck deactivated, cannot locate 'cppcheck'. i figured out that cppcheck cannot find linter executable, so I decided that I will add path to linter to my system $PATH property. But the thing is that I cannot find linter executable on my system. At first I thought that it's not installed but that I realised that it has to install with SublimeLinter package. But it did not. I tried to find it using unix find command the only result is :

/Users/syky/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.34.2/lib/cocoapods-core/specification/linter

That is not what I am looking for.

I am using Sublime Text 3, Mac OS X Yosemite and ZSH as my shell.

Can anyone help me please?


回答1:


SublimeLinter is looking for the cppcheck executable, which you apparently haven't installed. It is not looking for a file named linter. Please ensure that you have completely read and understood the SublimeLinter-cppcheck documentation before proceeding. The easiest way to install cppcheck is either via Homebrew or MacPorts (my personal favorite). Otherwise, you'll have to download and compile the source, which, if you're programming in C++, I assume you know how to do.

Once you have cppcheck installed, create a symlink to it in /usr/bin so Sublime can find it. Modifying your ZSH PATH won't do anything, unless you always launch Sublime from Terminal, because the PATH for programs launched from the Dock is different.



来源:https://stackoverflow.com/questions/26365718/sublimelinter-cppcheck-linter-executable-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!