Appends the current analysis results to a JSON history file, enabling debt trend tracking over time. Each entry records the timestamp, commit SHA (from CI environment variables), key metrics and SQALE rating. This is analogous to SonarQube's project history.
Arguments
- x
An
rsonar_resultobject returned bysonar_analyse().- file
Path to the JSON history file. Default
"rsonar-history.json". Created automatically if it does not exist.
Examples
if (FALSE) { # \dontrun{
res <- sonar_analyse(".")
sonar_trend(res)
sonar_trend(res, file = "quality-history.json")
} # }