Make toUnderscoreSeparated()'s clipboard behavior consistent with its siblings - #45
Open
vertesy wants to merge 2 commits into
Open
Make toUnderscoreSeparated()'s clipboard behavior consistent with its siblings#45vertesy wants to merge 2 commits into
vertesy wants to merge 2 commits into
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toCamelCase()andtoDotSeparated()both defaulttoclipboard = TRUEand guard the clipr call withrequireNamespace("clipr", quietly = TRUE)before attempting it.toUnderscoreSeparated()diverged on both counts: it defaulted toFALSE(even though its own@paramdoc already claimed "Default: TRUE" — a pre-existing doc/code mismatch this also fixes) and had norequireNamespace()guard at all, relying solely ontry(silent = TRUE)to swallow a missing-package error.Behavior change (confirmed with the repo owner): default
toclipboardtoTRUEto matchtoCamelCase()/toDotSeparated(), and add the samerequireNamespaceguard. Anyone callingtoUnderscoreSeparated()without explicitly passingtoclipboard = FALSEwill now attempt a clipboard write, same as its two siblings already do.Version bumped 1.2.1 → 1.2.2 in
Development/config.RandDESCRIPTION.Validation
R CMD check and the existing
testthatsuite (7/7 passing) were run on this branch; manually verifiedtoUnderscoreSeparated()still produces correct output. Remaining R CMD check findings (parFlagsexample error,parsepvalueundocumentedprefix,%!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