Skip to content

Commit

Permalink
Merge pull request #32 from getwilds/lint-fix
Browse files Browse the repository at this point in the history
Fixing linting warnings identified by GitHub Action
  • Loading branch information
tefirman authored Sep 12, 2024
2 parents 153ec51 + 5175edb commit 15bed3a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 3 additions & 1 deletion R/auth.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ proof_authenticate <- function(username, password) {
req_timeout(proofr_env$timeout_sec) |>
req_perform() |>
resp_body_json() |>
{\(x) x$token}()
{

Check warning on line 47 in R/auth.R

View workflow job for this annotation

GitHub Actions / lint

file=R/auth.R,line=47,col=5,[brace_linter] Opening curly braces should never go on their own line and should always be followed by a new line.
\(x) x$token
}()

Check warning on line 49 in R/auth.R

View workflow job for this annotation

GitHub Actions / lint

file=R/auth.R,line=49,col=5,[brace_linter] Closing curly-braces should always be on their own line, unless they are followed by an else.
}
5 changes: 2 additions & 3 deletions R/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
#' - `branch` (character): git branch of API
#' - `commit_sha` (character): SHA of the git commit of the API
#' - `short_commit_sha` (character): the first eight characters of `commit_sha`
#' - `commit_message` (character): the commit message of the API's most recent commit
#' - `tag` (character): tag of most recent commit; if this does not contain a hyphen, it's a release version
#' - `commit_message` (character): the commit message of API's most recent commit

Check warning on line 8 in R/info.R

View workflow job for this annotation

GitHub Actions / lint

file=R/info.R,line=8,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 81 characters.
#' - `tag` (character): tag of most recent commit (or release version if no hyphen)

Check warning on line 9 in R/info.R

View workflow job for this annotation

GitHub Actions / lint

file=R/info.R,line=9,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 83 characters.
proof_info <- function() {
request(make_url("info")) |>
req_timeout(proofr_env$timeout_sec) |>
req_error(body = error_body) |>
req_perform() |>
resp_body_json()
}

2 changes: 1 addition & 1 deletion tests/testthat/helper-stubs.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ response_authenticate_success <- list(
token_creation_date = NULL
)

response_info_success <- list (
response_info_success <- list(
branch = "main",
commit_sha = "c4b85200632c2f9bd5e8173179208c3b32c7db7a",
short_commit_sha = "c4b85200",
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-proof_cancel.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ test_that("proof_cancel - success", {
status = 200L,
headers = list("Content-type" = "application/json")
)
# stub_registry()

enable(quiet = TRUE)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-proof_header.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ test_that("proof_header", {
# If PROOF_TOKEN env var set, fxn can find it
withr::with_envvar(c("PROOF_TOKEN" = "notarealtoken"), {
expect_match(proof_header(request(""))$headers[[1]],
"notarealtoken")
"notarealtoken")
})
})

0 comments on commit 15bed3a

Please sign in to comment.