Learn R Programming

covr (version 4.0.0)

covr-deprecated: Deprecated functions

Description

These functions are deprecated and warn once per session (to_cobertura() only in interactive sessions). They return the same value as the functions that replace them, and cov and filename are the x and file arguments of those functions:

  • to_cobertura() is now cobertura().

  • to_sonarqube() is now sonarqube().

Usage

to_cobertura(cov, filename = "cobertura.xml")

to_sonarqube(cov, filename = "sonarqube.xml", path_prefix = NULL)

Arguments

cov

the coverage object returned from package_coverage()

filename

the name of the output file

path_prefix

SonarQube expects file paths relative to the project's base directory. By default the paths are relative to the package root (e.g. R/foo.R), which is correct when the package is the root of the SonarQube project. If the package is in a subdirectory of the project, set path_prefix to that subdirectory (e.g. "pkg" gives pkg/R/foo.R).