cpplint installed but not working on vscode
Basically, cpplint is installed but it is not working on the vscode gui. I can run the command and it shows the problems but does not highlight or do anything to vscode.
i'm win10, use python3.9 inatall the cpplint.exe, not working on vscode.
I found the problem, the folder or file opened by VSCode cannot contain Chinese characters...
I met a similar issue:
- First, I am sure cpplint is installed
$ cpplint
Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...]
[--counting=total|toplevel|detailed] [--root=subdir]
[--linelength=digits]
<file> [file] ...
The style guidelines this tries to follow are those in
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
Every problem is given a confidence score from 1-5, with 5 meaning we are
certain of the problem, and 1 meaning it could be a legitimate construct.
This will miss some errors, and is not a substitute for a code review.
To suppress false-positive errors of a certain category, add a
'NOLINT(category)' comment to the line. NOLINT or NOLINT(*)
suppresses errors of all categories on that line.
The files passed in will be linted; at least one file must be provided.
Default linted extensions are .cc, .cpp, .cu, .cuh and .h. Change the
extensions with the --extensions flag.
Flags:
output=vs7
By default, the output is formatted to ease emacs parsing. Visual Studio
compatible output (vs7) may also be used. Other formats are unsupported.
- Second, it is also correctly configured in vscode's
settings.json.
However, it never displays code-style or other info in vscode...
@BIAOXYZ Is your operating system Windows? If it is, i think your path is wrong, here are my settings:
"cpplint.cpplintPath": "D:\\ProgramFiles\\Python39\\Scripts\\cpplint.exe"
Maybe you can wrapper cpplint.py as a script cpplint.bat, refer to #16 . I have tried this method, it is feasible.
@BIAOXYZ Is your operating system Windows? If it is, i think your path is wrong, here are my settings:
"cpplint.cpplintPath": "D:\\ProgramFiles\\Python39\\Scripts\\cpplint.exe"Maybe you can wrapper cpplint.py as a script cpplint.bat, refer to #16 . I have tried this method, it is feasible.
@weycen Thanks a lot for your help.
The OS of my development machine (where the project as well as the settings.json file lies in) is Debian 9. However, I use vscode's remote ssh mode, so the picture is a screenshot from a Mac Book Pro.
I've already tried adding .py to the end, namely, using this ("/usr/local/bin/cpplint.py") as the value of key "cpplint.cpplintPath". But vscode immediately prompt this:

@BIAOXYZ Is your operating system Windows? If it is, i think your path is wrong, here are my settings:
"cpplint.cpplintPath": "D:\\ProgramFiles\\Python39\\Scripts\\cpplint.exe"Maybe you can wrapper cpplint.py as a script cpplint.bat, refer to #16 . I have tried this method, it is feasible.
@weycen Thanks a lot for your help.
The OS of my development machine (where the project as well as the
settings.jsonfile lies in) is Debian 9. However, I use vscode's remote ssh mode, so the picture is a screenshot from a Mac Book Pro.I've already tried adding
.pyto the end, namely, using this ("/usr/local/bin/cpplint.py") as the value of key"cpplint.cpplintPath". But vscode immediately prompt this:
Same problem here. Is there any solution?