cppcheckR | R Documentation |
HTML widget which runs Cppcheck.
cppcheckR( path, std = NULL, def = NULL, undef = NULL, checkConfig = FALSE, height = NULL, elementId = NULL )
path |
path to a C/C++ file or to a folder containing C/C++ files |
std |
the standard, one of |
def |
character vector of symbols you want to define, e.g.
|
undef |
character vector of symbols you want to undefine;
if |
checkConfig |
Boolean, whether to run Cppcheck with the
option |
height |
height in pixels (defaults to automatic sizing) |
elementId |
an id for the widget, this is usually useless |
A htmlwidget
object.
example <- function(file){ filepath <- system.file("cppexamples", file, package = "cppcheckR") lines <- readLines(filepath) print(cppcheckR(filepath, std = "c++03", def = NA, undef = NA)) message(file, ":") cat(paste0(format(seq_along(lines)), ". ", lines), sep = "\n") } example("memleak.cpp") example("outofbounds.cpp") example("unusedvar.cpp") example("useless.cpp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.