-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add the ability to disable certain linter errors #2345
Comments
Not similar to #2299. Assigning array lengths with variables causes an error in standard C++, and doesn't cause in g++ using the C99 extension. |
This error should go away when you set your compilerPath to something like "C:\MinGW\bin\g++.exe" or your intelliSenseMode to clang-x64 (in c_cpp_properties.json). We've had previous requests for some error ignoring feature: #1231 . |
Great! Specializations for special compilers are necessary. |
#791 is somewhat related (i.e. we could attach an error code to missing include messages to allow users to filter them out). |
Same feature request here, I was about to open a duplicate issue, then I found this. Originally posted here: microsoft/vscode#72669 Describe the bug
What I would like to do is ignore a specific token/string from code validation / error checking. Everything else shows up properly as not being an error, but this "TTR" text is underlined in red. I already know that this code runs properly, so I would just like to exclude VS Code from underlining this piece of text in red, so that it is ignored, and I do not have to see these errors when scrolling through the code. I'm not asking for help for resolving the underlying problem of VS Code not understanding this token. I just want to disable this error from showing up. Perhaps some configuration file where I can put text or tokens to ignore, probably each one on its own line to allow multiple ignores. |
FYI, you can use
to suppress the "expression must have a constant value" error. We don't expose the error numbers yet (for other errors), but we may add those later on. |
With https://github.com/microsoft/vscode-cpptools/releases/tag/0.30.0-insiders4 , we show the IntelliSense error codes, so
could be used as a workaround for suppressing IntelliSense errors (replace 28 with the error code). |
This feature request has received enough votes to be added to our backlog. |
Type: LanguageService
Many people use g++ (MinGW on Windows), and I am also like this. g++ extends some C99 features in C++, such as array lengths that can be defined with variables which is considered a error by VS Code.
auto a = new int[l];
in standard C++.auto a[l];
in g++ and C99.I know that defining with a const is a standard C++ convention, and it is also common sense. But in some cases (such as algorithms), it is convenient to use variable definitions.
I think it's a good idea to let me remove some of the error.(because VS Code is a. editor that doesn't know how the compiler handles certain "errors") Add a point to disable the static error prompt in source, in file or in global setting. Just like in user settings, we can list all static error types.
We can also make g++ specification. This specification remove some features which are not supported in VS Code. The default is the original specification. But when I use g++ in tasks.json, it can automatically enable. It seems that there is a similar error specification function in VS.
The text was updated successfully, but these errors were encountered: