CHOP-CGTInformatics / REDCapTidieR

Makes it easy to read REDCap Projects into R
https://chop-cgtinformatics.github.io/REDCapTidieR/
Other
33 stars 8 forks source link

Consolidate `parse_labels()` errors #135

Closed ezraporter closed 1 year ago

ezraporter commented 1 year ago

Description

This PR consolidates the two errors thrown by parse_labels() which we can't effectively distinguish and adds test cases to cover both missing commas and extra pipes.

Proposed Changes

List changes below in bullet format:

Issue Addressed

Closes #130

PR Checklist

Before submitting this PR, please check and verify below that the submission meets the below criteria:

Code Review

This section to be used by the reviewer and developers during Code Review after PR submission

Code Review Checklist

ezraporter commented 1 year ago

So just checking, we're not changing any logic just consolidating the flag that could be brought up for either case under one more generalized error message?

Yup I'm actually 95% sure the second check can't fire without triggering the first but I decided we might as well keep both in case there's some edge case we're missing.