Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>C/C++ LinterNew to Visual Studio Code? Get it now.
C/C++ Linter

C/C++ Linter

crugthew

|
2,938 installs
| (0) | Free
C/C++ linter using various command-line tools.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

About

This project is a VSCode extension which provides linting for C/C++ source files. The goal is to provide linting for source files at the click of a button. That's it, no smart features intended.

Preview

This extension simply runs the configured tools either on file open and save events or at the explicit user request (either by command pallette or a keybinding) and shows the linting information in VSCode.

This extension aims to be:

  • Easily extendable for other linting information providers;
  • Working with minimal additional project configuration;

As of this release the extension can be used to gather linting information from these providers:

  • Compiler (GCC, clang ...)
  • Clang-Tidy
  • CppCheck

Note: Compiler option means that this extension runs the selected compiler by running only the syntax processing stage and the static analyzer. Default configuration is provided for g++ though it can be easily adapted for clang.

By default all the tools are enabled and expected to be installed on the host system. If any tool is missing you will get an error each time the extension tries to run. Please turn disable running a specific tool in settings if you do not plan to use it, for example:

"c-cpp-linter.cppCheck.enabled": false

Requirements

For the extension to be useful at least one of the above mentioned linting providers must be installed on the host system.

The extension expects the project to provide a compile_commands.json file in an appropriate format. The default location where the file is to located is ${workspaceFolder}/build/compile_commands.json. This can be changed by the c-cpp-linter.general.buildFolderPath setting.

Configuration

Each tool can be configured separately. Please refer to the contributions section of this extension.

Environment

The extension was written and tested under Linux. It should work under Windows as well, though I can not check it myself at this time.

"It's not working!"

Please refer to the output tab and check the logs for the extension. Most likely you either don't have any tools installed or compile_commands.json can't be found.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft