Skip to content

Commit

Permalink
require full url to remote git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
kbvernon committed Aug 1, 2024
1 parent 1c207fe commit bb6df9f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions R/use_crate.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @param crate character scalar, the name of the crate to add
#' @param features character vector, a list of features to include from the
#' crate
#' @param git character scalar, the URL of the Github repository
#' @param git character scalar, the full URL of the remote Git repository
#' @param version character scalar, the version of the crate to add
#' @param optional boolean scalar, whether to mark the dependency as optional

Check warning on line 10 in R/use_crate.R

View workflow job for this annotation

GitHub Actions / lint

file=R/use_crate.R,line=10,col=78,[trailing_whitespace_linter] Trailing whitespace is superfluous.
#' (FALSE by default)
Expand All @@ -29,7 +29,7 @@
#' use_crate("serde", features = "derive")
#'
#' # add to [dependencies] using github repository as source
#' use_crate("serde", git = "serde-rs/serde")
#' use_crate("serde", git = "https://github.com/serde-rs/serde")
#'
#' # add to [dependencies] with specific version
#' use_crate("serde", version = "1.0.1")
Expand All @@ -43,8 +43,7 @@ use_crate <- function(
git = NULL,
version = NULL,
optional = FALSE,
path = ".",
...
path = "."
){

Check warning on line 47 in R/use_crate.R

View workflow job for this annotation

GitHub Actions / lint

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

Check warning on line 47 in R/use_crate.R

View workflow job for this annotation

GitHub Actions / lint

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

# check crate
Expand Down Expand Up @@ -92,8 +91,6 @@ use_crate <- function(

}

git <- paste0("https://github.com/", git)

}

# check version
Expand Down

0 comments on commit bb6df9f

Please sign in to comment.