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

Merged
merged 14 commits into from
Nov 15, 2024
Merged

Conversation

kbvernon
Copy link
Contributor

To address #387, this PR adds a check for empty strings when running purrr::discard() on the cargo_add_opts list.

@CGMossa
Copy link
Member

CGMossa commented Sep 18, 2024

How do we know that this works? Is it possible to add a test? Otherwise I'd just merge.

@kbvernon
Copy link
Contributor Author

yes, this function needs a test. i'll look into adding one tomorrow!

@kbvernon
Copy link
Contributor Author

Pasting flags and values together into single character scalars is the wrong way to pass additional arguments to processx::run(), so I opted to concatenate them into a character vector. This has the advantage of making purrr::discard() unnecessary, as concatenating drops NULL values.

@JosiahParry
Copy link
Contributor

@kbvernon one last test! can you test the optional feature? The nifty codecov tool shows that it is missing a check :)

@JosiahParry
Copy link
Contributor

100% code cov? You're crazy for that.

@JosiahParry JosiahParry enabled auto-merge (squash) November 15, 2024 16:21
@JosiahParry JosiahParry merged commit d58284b into extendr:main Nov 15, 2024
19 checks passed
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.76%. Comparing base (5478786) to head (cb1c985).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
R/use_crate.R 100.00% <100.00%> (+100.00%) ⬆️

@kbvernon kbvernon deleted the fix-use-crate branch November 17, 2024 19:10
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.

4 participants