Skip to contents

Export failed checks to JSON

Usage

export_json(gp, file, pretty = FALSE)

Arguments

gp

gp output.

file

Output connection or file.

pretty

Whether to pretty-print the JSON.

Value

Invisibly returns the path to the output file.

Examples

path <- system.file("bad1", package = "goodpractice")
g <- gp(path, checks = "description_url")
#> ── Preparing goodpractice for badpackage ───────────────────────────────────────
#>  Preparing: description
#>  Preparing: description [10ms]
#> 
tmp <- tempfile(fileext = ".json")
export_json(g, tmp)
unlink(tmp)