-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Linting is broken #746
Comments
+1 |
+1 Add |
I just wiped my vscode install:
Linting is back to normal
|
Did a clean install as well, did not work on Ubuntu 16.04 |
I am happy to help anyone having troubles getting linting to work. The reason you haven't had linting troubles in the past is because we didn't do any linting in the past besides a green squiggle for For most people, updating your In some cases, deleting your c_cpp_properties.json and letting the extension generate a new one might help, but only because we add additional And to address the original comment, the reason you see contradicting tooltips is because we are still in the process of implementing all of the editor features with the new IntelliSense engine. Goto definition results are still being populated by the tag parser. If this is distracting to you, you can disable the new IntelliSense engine for now by changing the |
I mentioned that I did not add lines like:
I restored the the similar lines and I get linting errors again. Mine were:
|
@starsharp06sharp For string you need |
@starsharp06sharp Okay, I got the errors to go away after I added additional header files "/usr/include/x86_64-linux-gnu/c++/6.2.0" and "/usr/include/c++/v1". I'm not sure yet if we should be adding those as defaults or not. I think you need to find which headers you're using to compile and then then open the #include files to see if it needs more. The "Error: Failed to find translation unit" is a bug we need to investigate more (I've seen it many times somewhat randomly)...it's supposed to create a translation unit if none is found. |
@sean-mcmanus the x86_64-linux-gnu path should be added if it is present, but v1 will not be added by default on Linux. @starsharp06sharp, can you respond back with the output of:
That command should dump your default include path to the terminal. |
@bobbrow The x86_64-linux-gnu path isn't being added for me -- looks like a bug? |
Yes, that would be a bug. |
What is actually happening is that the recursive searching of includePaths entries is broken. It is only parsing directories that are specifically added. Which is a problem because most entries rely on the recursive searching of sub-folders. |
It is not broken, but we're looking at ways to try to make the experience work better with less effort on your part. Our fuzzy IntelliSense (tag parser) does recursive parsing of files, but I don't know of any compiler that does a recursive search of include paths. In order to provide semantic-aware features to the extension, the IntelliSense engine of necessity needs to act more like a compiler, and less like an approximation. |
thank you @bobbrow and @sean-mcmanus , after I add |
NOTE: I had problem with intellisense on OSX since I upgraded to 0.11.1, the paths I had to add to my c_cpp_properties.json are: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1", Most of them can be retrieved with the command previously posted:
But the last one (the bold one) cannot, I hope that this can help someone :) |
This is solved by now, closing the issue. |
The linting was working fine until now. I have cpptools Version 0.11.1: May 19, 2017
The 2 lines are contradictory. I get similar errors everywhere.
I am sure that the settings are correct. I had no linting problems before.
The text was updated successfully, but these errors were encountered: