Visual Code Studio with C/C++ extension: How to disable warnings - visual-studio-code

I'm working with Zephyr OS in the Visual Code Studio IDE.
Zephyr uses a lot of Macros but the C/C++ extension does not like that and throws Warnings.
One example of a warning you can see here on the screenshot "The function call is not allowed in a constant expression. C/C++(59)"
Do you probably now where I can add that warning to a kind of ignore/suppress list?
Many thanks!

Related

search analyzer and formatter for Visual studio code

I would like to find a linter to analyze the formatting of my code, and also use the linter locally to format my code. And I would want to be able to do that with Visual studio code (and ideally, also Visual studio).
Right now, I am using Visual studio with resharper. But it's way too slow for me.
So I installed visual studio code, installed the extension omnisharp and roslynator, to be able to have the same formatting rules as resharper. So it works well, I configured my config file to display error when a rule is not respected, like that :
My issue is, I can't find a way to fix all these issue with a shortcut, like I use to do with Visual studio and resharper.
The shortcut shift+alt+F does not fix all my errors, and the command omnisharp "fixall" act weirdly, it remove my function Hi..
Do you have suggestion of setup with visual studio code to be able to format the code directly (not via a command line, but from a shortcut), and as advanced as resharper, and that could also work as a linter to analyze the code on the CI?

SuiteScript with Intellisense in VS Code

I have the latest Visual Studio Code.
I have installed the latest SuiteCloud Extension for VS Code.
There is no intellisense.
I have also installed the SuiteNippets extension -- which is ok--but not full intellisense.
I am baffled as to why this is missing. Do I need to import/reference something from NetSuite--despite using their extension already?
How do I enable intellisense in VS Code for SuiteScript?
See my previous answer to a similar question. It's possible to use the Head-in-the-Cloud bundle to create javascript transpiled from TypeScript files. The code completion is good and you have the added benefit of type checking.

VS Code Error vs Visual Studio 2019 Error

I Used VS code to write some code but the compiler is working only in the terminal. So I set up Visual Studio 2019 For C++ but get an error that I didn't get in VS Code. (I know the solution to the error):
The uninitialized local variable 'name' used
and the solution is Just adding these {} brackets to the variable.
Why is This Happening in Visual Studio 2019 and not in VS Code?
Note: I Installed "MinGW" for VS Code and desktop development with C++ for Visual Studio 2019.
Additional: I Want Visual Studio 2019 to Show unused scopes (#Include things) and help me to clean code.
Check your exception settings in Visual Studio (Ctrl + Alt + E) and/or your Warning Level on the Project file (right click on project in solution explorer, click Properties, C/C++ > General > Warning Level).
The warning/exception controls in Visual Studio are rather detailed.
The "warning that is now an error" issue related to The uninitialized local variable 'name' used simply comes down to the out-of-the-box settings in Visual Studio. You can change them if you'd like. Technically, your code will compile under every C++ compiler I'm aware of, but has a greater likelihood of crashing.
As for whether it should be a warning or an error, that is more opinion than fact. My opinion is that it should be an error, because such situations can lead to very sneaky program crashes, but there is no hard-and-fast rule.

How to Run C and C++ Programs on VS code?

As per my question, I want to compile & run c/c++ program directly from Visual Studio Code (vscode).
so is there anything like live server (like HTML) when I save file it gets compiled and runs automatically...
C++ support for Visual Studio Code is currently experimental. You may have look at this extension to accomplish what you ask.

How to configure Visual Studio Code to build a project with IAR compiler?

I want to use Visual Studio Code as my main IDE, but I want to compile my code with IAR's compiler.
How could I configure VSCode ?
I found this extension but the documentation is too poor.
Yes, the extension politoleo.iar is indeed NOT good.
-> I found a better one (will try it in future by myself):
VSCode plugin: pluyckx.iar-vsc
IAR For Visual Studio Code - Visual Studio Marketplace
Good document
Welcome to IAR-VSC’s documentation! — IAR-VSC 1.2 documentation
doc's Github source: pluyckx/iar-vsc
IAR related official Technical Note
Using Visual Studio Code with IAR Embedded Workbench
Enjoy it !
There are now two official IAR plugins for VSCode which make things much easier:
For building and development: https://marketplace.visualstudio.com/items?itemName=iarsystems.iar-build
For debugging with C-Spy: https://marketplace.visualstudio.com/items?itemName=iarsystems.iar-debug
https://www.iar.com/knowledge/support/technical-notes/general/using-visual-studio-code-with-iar-embedded-workbench/
What I did is setting some environment variables in settings.json;
then in tasks.json I created shell tasks that call the IarBuild.exe & IarIdePm.exe with appropriate values (see the documentation on the command line options)...
So now, I can use VSCode for navigation & editing, but the compilation is done by the EWARM.
The only thing that I haven't figure out yet is how to make C-Spy work from within VSCode...
Currently when I want to debug, I just launch the EWARM and debug from there...
here is a screenshot:Screenshot of settings.json and tasks.json
For this, you can port you project to the custom build system (non iarbuild), e.g. a best choose is the Qbs. The Qbs support a lot of architectures and the toolchains (include IAR, KEIL and so on). In this case you can then use any IDE which support the Qbs, e.g. such as VSCode or QtCreator, and to open your project in any of these IDEs.
Both IDEs support only the GDB debugging, because the C-Spy debuger is a proptietary technology, which has not the public datasheets.