This function validates a script project by checking for warnings and errors,
retrieving commit information, calculating the number of lines and size of the script,
and validating its style. It can optionally export the results to a dataframe.
Usage
validate_script_addin(filepath, export_to_dataframe = FALSE)
Arguments
- filepath
A character string specifying the path to the script file to validate.
If not provided, it defaults to the current working directory.
- export_to_dataframe
A logical value indicating whether to export the validation
results to a dataframe. Default is FALSE.
Value
A tibble with various validation results. If export_to_dataframe
is TRUE,
the results are returned as a dataframe. Otherwise, a summary of the results is printed.
Examples
if (FALSE) { # \dontrun{
# Validate a script with default parameters
validate_script_addin()
# Validate a specific script and export the results to a dataframe
validate_script_addin(filepath = "/path/to/script.R", export_to_dataframe = TRUE)
} # }