Skip to content

Make toUnderscoreSeparated()'s clipboard behavior consistent with its siblings - #45

Open
vertesy wants to merge 2 commits into
devfrom
tounderscoreseparated-clipboard-consistency
Open

Make toUnderscoreSeparated()'s clipboard behavior consistent with its siblings#45
vertesy wants to merge 2 commits into
devfrom
tounderscoreseparated-clipboard-consistency

Conversation

@vertesy

@vertesy vertesy commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

toCamelCase() and toDotSeparated() both default toclipboard = TRUE and guard the clipr call with requireNamespace("clipr", quietly = TRUE) before attempting it. toUnderscoreSeparated() diverged on both counts: it defaulted to FALSE (even though its own @param doc already claimed "Default: TRUE" — a pre-existing doc/code mismatch this also fixes) and had no requireNamespace() guard at all, relying solely on try(silent = TRUE) to swallow a missing-package error.

Behavior change (confirmed with the repo owner): default toclipboard to TRUE to match toCamelCase()/toDotSeparated(), and add the same requireNamespace guard. Anyone calling toUnderscoreSeparated() without explicitly passing toclipboard = FALSE will now attempt a clipboard write, same as its two siblings already do.

Version bumped 1.2.1 → 1.2.2 in Development/config.R and DESCRIPTION.

Validation

R CMD check and the existing testthat suite (7/7 passing) were run on this branch; manually verified toUnderscoreSeparated() still produces correct output. Remaining R CMD check findings (parFlags example error, parsepvalue undocumented prefix, %!in% Rd-name warning, sandbox locale warning) are pre-existing and out of scope, addressed in other PRs in this batch or environment-inherent.


Generated by Claude Code

claude added 2 commits August 27, 2026 21:20
… siblings

toCamelCase() and toDotSeparated() both default toclipboard = TRUE and
guard the clipr call with requireNamespace("clipr", quietly = TRUE)
before attempting it. toUnderscoreSeparated() diverged on both counts:
it defaulted to FALSE (even though its own @PARAM doc already claimed
"Default: TRUE", a pre-existing doc/code mismatch this also fixes) and
had no requireNamespace() guard at all, relying solely on try(silent =
TRUE) to swallow a missing-package error.

Change (confirmed with the repo owner): default toclipboard to TRUE to
match toCamelCase()/toDotSeparated(), and add the same requireNamespace
guard. This is an intentional default-behavior change: anyone calling
toUnderscoreSeparated() without explicitly passing toclipboard = FALSE
will now attempt a clipboard write, same as its two siblings already do.

Version bumped 1.2.1 -> 1.2.2 in Development/config.R and DESCRIPTION.

Validation: R CMD check and the existing testthat suite (7/7 passing)
were run on this branch; manually verified toUnderscoreSeparated() still
produces correct output. Remaining R CMD check findings (parFlags
example error, parsepvalue undocumented prefix, %!in% Rd name warning,
sandbox locale warning) are pre-existing and out of scope, addressed in
other PRs in this batch or environment-inherent.
…clipboard-consistency

# Conflicts:
#	DESCRIPTION
#	Development/config.R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants