Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpplint installed but not working on vscode #42

Open
TeachMeTW opened this issue Jun 23, 2021 · 5 comments
Open

cpplint installed but not working on vscode #42

TeachMeTW opened this issue Jun 23, 2021 · 5 comments

Comments

@TeachMeTW
Copy link

TeachMeTW commented Jun 23, 2021

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
Copy link

weycen commented Jul 27, 2021

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
Copy link

BIAOXYZ commented Aug 4, 2021

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

However, it never displays code-style or other info in vscode...

@weycen
Copy link

weycen commented Aug 5, 2021

@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
Copy link

BIAOXYZ commented Aug 5, 2021

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants