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 nowcobertura().to_sonarqube()is nowsonarqube().
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, setpath_prefixto that subdirectory (e.g."pkg"givespkg/R/foo.R).
