Skip to content

Commit

Permalink
Flesh out reference documentation for the error_check function
Browse files Browse the repository at this point in the history
Adds context to the error_check function documentation. We need more complete documentation in order to publish to CRAN (ropenscilabs#209).

The updated documentation adds details, return values, and a couple of examples.

See: ropenscilabs#209
  • Loading branch information
changecase committed Jun 22, 2021
1 parent 9344999 commit edb35e9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
11 changes: 10 additions & 1 deletion R/parse_qcodes.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,18 @@ parse_qcodes <- function(x, ...){
}

#' Check for coding errors
#'
#' Checks the current document for coding errors.
#'
#' @param document The document to be scanned for errors.
#' This function takes a string (such as the contents of a document), and conducts some basic linting. It returns a warning if there aren't a matching number of \code{(QCODE)} tags, or if text has been marked to be captured but the capture is missing a tag (missing \code{{#my_tag}}).
#'
#' @param document A string to be scanned for errors.
#'
#' @return A \code{warning} message as a character string.
#'
#' @examples
#' error_check("An (QCODE)unmatched set of (QCODE) gives (/QCODE){#tag} a warning.")
#' error_check("A (QCODE) qcode with a missing tag gives a warning.")
#'
#' @export
error_check <- function(document) {
Expand Down
17 changes: 13 additions & 4 deletions man/error_check.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit edb35e9

Please sign in to comment.