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().
to_cobertura(cov, filename = "cobertura.xml")to_sonarqube(cov, filename = "sonarqube.xml", path_prefix = NULL)
the coverage object returned from package_coverage()
the name of the output file
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).