metrumresearchgroup / review

helpful tools for organizing and performing quality control (QC) tasks
https://metrumresearchgroup.github.io/review/
2 stars 0 forks source link

Request for informative diffQced error when file has not been approved #57

Closed toddyoder closed 7 months ago

toddyoder commented 7 months ago

The error message is not very informative when attempting to use diffQced on a file which has not yet been accepted in the QC log. Perhaps it could tell the user that the file is not in the log or has not yet been accepted?

review::diffQced("script/data-assembly.Rmd")
svn: Unable to find repository location for 'script/data-assembly.Rmd' in revision 0
Error in if (tools::md5sum(.previous_revision_temp_file) == tools::md5sum(.current_revision_temp_file)) { : 
  missing value where TRUE/FALSE needed`
michaelmcd18 commented 7 months ago

@toddyoder What version of review are you using?

Version 3.7.0 attempted to address this with this addition to diffQCed()

if (is.na(qced_revision)) {
    cli::cli_abort(glue::glue("'{.file}' has no record in the QC log"))
  }

If you're using an earlier version the error message you showed would be the expected output

toddyoder commented 7 months ago

@michaelmcd18 I am using an older version of review. Thank you for clarifying that for me.

michaelmcd18 commented 7 months ago

No problem, thanks for making an issue about this!