error_check: Check for coding errors

Description Usage Arguments Details Value Examples

View source: R/parse_qcodes.R

Description

Checks the current document for coding errors.

Usage

1
error_check(document)

Arguments

document

A string to be scanned for errors.

Details

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 (QCODE) tags, or if text has been marked to be captured but the capture is missing a tag (missing {#my_tag}).

Value

A warning message as a character string.

Examples

1
2
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.")

ropenscilabs/qcoder documentation built on Dec. 31, 2021, 9:11 p.m.