Giter Club home page Giter Club logo

vscode-cppcheck's Introduction

Cppcheck for VS Code

This is an extension for Visual Studio Code to run Cppcheck on your project.

Visual Studio Marketplace Version (including pre-releases) Visual Studio Marketplace Version (including pre-releases) Build & Test

Features

Requirements

You must install Cppcheck and have it available in your PATH.

Known Issues

GitHub issues by-label Static Badge

GitHub issues by-label Static Badge

Static Badge

vscode-cppcheck's People

Contributors

brobeson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-cppcheck's Issues

Diagnostics do not point to the correct file

Extension Version

v0.1.0

Current Behavior

When Cppcheck scans a file and reports errors in other files, all the diagnostics are tied to the original file instead of the files that actually have issues.

Expected Behavior

The diagnostics need to refer to the correct file. Then the problems panel and editor squiggles will be correct.

Cppcheck tries to check non-C++ files

Extension Version

v0.1.0

Current Behavior

If I open a Markdown file, VS Code Cppcheck will report a syntax error in the file.

Expected Behavior

VS Code Cppcheck should ignore files that are not C or C++.

Add support for Cppcheck project files

Extension Version

v0.1.0

What's the feature?

Add a setting for the user to control the --project command option. Default to the compile_commands.json file the extension can find it, or no project if the extension cannot find compile_commands.json.

Restore the unit tests

Figure out why the unit tests stopped working when I cleaned up my branches, and fix them.

Let the user set --enable options

Extension Version

v0.1.0

What's the feature?

Add a setting for the user to set --enable command options.

  • Make the setting a list of strings.
  • Validate each string; let the user know if one is not valid.
  • For each string, add an --enable option to the Cppcheck command.

Parsing some Cppcheck output can fail

Extension Version

v0.1.0

Current Behavior

The extension quietly does not add diagnostics. The problem is that it fails to parse the JSON output. Here is example bad output:

"[{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/application.h\",\"line\":4,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: \"tracking-analyzer/dataset.h\" not found.\",\"id\":\"missingInclude\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/application.h\",\"line\":5,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: \"tracking-analyzer/tracking_results.h\" not found.\",\"id\":\"missingInclude\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/application.h\",\"line\":6,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: <QApplication> not found. Please note: Cppcheck does not need standard library headers to get proper results.\",\"id\":\"missingIncludeSystem\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/application.h\",\"line\":7,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: <QImage> not found. Please note: Cppcheck does not need standard library headers to get proper results.\",\"id\":\"missingIncludeSystem\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/application.h\",\"line\":8,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: <QSettings> not found. Please note: Cppcheck does not need standard library headers to get proper results.\",\"id\":\"missingIncludeSystem\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/application.h\",\"line\":9,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: <gsl/pointers> not found. Please note: Cppcheck does not need standard library headers to get proper results.\",\"id\":\"missingIncludeSystem\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/gui/main_window.h\",\"line\":4,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: \"color.h\" not found.\",\"id\":\"missingInclude\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/gui/main_window.h\",\"line\":5,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: <QMainWindow> not found. Please note: Cppcheck does not need standard library headers to get proper results.\",\"id\":\"missingIncludeSystem\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/gui/main_window.h\",\"line\":6,\"column\":0,\"severity\":\"information\",\"message\":\"Include file: <vector> not found. Please note: Cppcheck does not need standard library headers to get proper results.\",\"id\":\"missingIncludeSystem\"},\n{\"file\":\"/home/brendan/repositories/tracking-analyzer/tracking-analyzer/tracking-analyzer-gui/gui/main_window.h\",\"line\":34,\"column\":10,\"severity\":\"error\",\"message\":\"There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it.\",\"id\":\"unknownMacro\"}]"

The problem with this example is quotation marks in the missing include file paths. They break JSON parsing.

Expected Behavior

  1. If the extension fails to parse the output, it should report an error to the user.
  2. The extension should be able to parse this output.

Scan C files

Extension Version

v0.1.0

What's the feature?

Ensure the extension runs on C files. I've only checked it on C++ files.

Editor squiggles are off by 1

Extension Version

v0.1.0

Current Behavior

The start column for editor squiggles is too high by 1. See this example:

image

Expected Behavior

The squiggle should start one column to the left, under the "n" in namespace.

Implement a release script

Extension Version

v0.1.0

What's the feature?

The release process should:

  • Ensure all references to the version in the code are up to date.
  • Build the vsix.
  • Create a GitHub release.
  • Upload the vsix to the GH release.
  • Tag the repository.
  • Publish the extension to the marketplace.

Offload as much as possible to a GH workflow.

Scan a C++ file when a developer opens it

Extension Version

v0.1.0

What's the feature?

The current behavior requires the developer to save a file to run Cppcheck. Add functionality to run Cppcheck when the developer opens the file, too.

Add an issue triage workflow

Extension Version

v0.1.0

What's the feature?

When someone submits a new issue, run the workflow. It should update the description with a list of tasks for the assignee. The tasks are:

  • Update the user documentation.
  • Update the change log.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.