Peter
Peter

Reputation: 613

SublimeLinter can not check C and C++

I installed the SublimeLinter to Sublime Text 2 for checking the C and C++, but it seems not work.

The SublimeLinter can work well for Python, but when I write the C and C++, nothing happens. My SublimeLinter's setting-user likes this:

{
   "sublimelinter_syntax_map":
   {
      "Python Django": "python",
      "Ruby on Rails": "ruby",
      "C++"          : "c_cpplint",
      "C"            : "c_cpplint"
   },

   "sublimelinter_executable_map": 
   { 
      "c_cpplint": "/Users/peterlee/Desktop/cpplint.pyc" 
   }

}

The "cpplint.py" is downloaded from Google. But I don't know why it doesn't work.

Upvotes: 1

Views: 2880

Answers (1)

samsin
samsin

Reputation: 1194

I experienced this issue. Does the following happen if you try this from a terminal window?

$ /Users/peterlee/Desktop/cpplint.py
-bash: /Users/peterlee/Desktop/cpplint.py: Permission denied

If so, run chmod +x on that file. After I did something similar, the following now shows up in the Sublime Text console when modifying a cpp file.

SublimeLinter: c_cpplint enabled (using "/Users/<some path>/cpplint.py" for executable)

Upvotes: 1

Related Questions