Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for empty string in use_crate() #388

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion R/use_crate.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
)

# clear empty options
cargo_add_opts <- purrr::discard(cargo_add_opts, rlang::is_empty)
is_null_or_empty_string <- function(x){ !nzchar(x) || rlang::is_empty(x) }

Check warning on line 67 in R/use_crate.R

View workflow job for this annotation

GitHub Actions / lint

file=R/use_crate.R,line=67,col=41,[brace_linter] Opening curly braces should never go on their own line and should always be followed by a new line.

Check warning on line 67 in R/use_crate.R

View workflow job for this annotation

GitHub Actions / lint

file=R/use_crate.R,line=67,col=41,[brace_linter] There should be a space before an opening curly brace.

Check warning on line 67 in R/use_crate.R

View workflow job for this annotation

GitHub Actions / lint

file=R/use_crate.R,line=67,col=41,[paren_body_linter] There should be a space between a right parenthesis and a body expression.

Check warning on line 67 in R/use_crate.R

View workflow job for this annotation

GitHub Actions / lint

file=R/use_crate.R,line=67,col=76,[brace_linter] Closing curly-braces should always be on their own line, unless they are followed by an else.
cargo_add_opts <- purrr::discard(cargo_add_opts, is_null_or_empty_string)

# combine option names and values into single strings
adtl_args <- unname(purrr::imap_chr(
Expand Down
Loading