secularbird / cpplint-extension

vscode cpplint extension
MIT License
22 stars 12 forks source link

cpplint installed but not working on vscode #42

Open TeachMeTW opened 3 years ago

TeachMeTW commented 3 years ago

1 2

4 5 1 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.

weycen commented 3 years ago

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...

BIAOXYZ commented 3 years ago

I met a similar issue:

Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] [--counting=total|toplevel|detailed] [--root=subdir] [--linelength=digits]

[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`. ![image](https://user-images.githubusercontent.com/6740021/128183696-1e93a5b4-4b53-41a4-8b26-8989ad9046cb.png) However, it never displays code-style or other info in vscode...
weycen commented 3 years ago

@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 commented 3 years ago

@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:

image

SimonNie98 commented 3 months ago

@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:

image

Same problem here. Is there any solution?