Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cppchecksolutions/run-cppcheck

Repository files navigation

run-cppcheck

A wrapper for cppcheck to simplify cppcheck integration. This program exists to provide a way to configure how to run cppcheck on a single file, that can be shared between editor plugins. The log file also provides additional information that plugins may be lacking.

Building

CMake

mkdir build && cd build
cmake ..
make

Bazel

bazel build //:run-cppcheck

The compiled binary will be located at bazel-bin/run-cppcheck.

Invocation

run-cppcheck <file>

Configuration options

The configuration file is written in json, as run-cppcheck-config.json. It is searched for recursively in parent directories of the analyzed file.

  • project_file: a path to a project file accepted by the cppcheck option --project=.... If the path is relative, it's interpreted as relative to the configuration file.
  • cppcheck: cppcheck command.
  • log_file: Path to log file. The default log file location is $XDG_STATE_HOME/run-cppcheck or $HOME/.local/state/run-cppcheck on Linux, and %LOCALAPPDATA%\run-cppcheck on Windows. The log file may provide more information than the editor plugin if analysis fails.
  • enable_logging: Default is true.
  • extra_args: Extra arguments to pass to cppcheck. Example: ["--enable=style"].

About

cppcheck wrapper to simplify cppcheck integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages