-
Notifications
You must be signed in to change notification settings - Fork 186
Enable tests #669
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
Enable tests #669
Conversation
pc <- lapply(get_source_expressions(f)[["expressions"]], `[[`, "parsed_content") | ||
eval(substitute(code)) | ||
content_env <- new.env() | ||
content_env$pc <- lapply(get_source_expressions(f)[["expressions"]], `[[`, "parsed_content") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is because pc
was seen as an "unused variable"
@@ -88,7 +88,7 @@ test_that("lint() results do not depend on the position of the .lintr", { | |||
) | |||
) | |||
|
|||
lints_with_config_in_source_dir <- withr::with_dir( | |||
lints_with_config_in_r_dir <- withr::with_dir( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long variable name
|
||
# Template packages for use in testing are stored in | ||
# `tests/testthat/dummy_packages/<pkgName>` | ||
# tests/testthat/dummy_packages/<pkgName> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these were all dinged by commented_code_linter
# When called from inside a package: | ||
# lint_package(".") | ||
# lint_package(".") # nolint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good idea to # nolint this according to the new #660 syntax once we settle on a final default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about a follow-up issue for tagging all # nolint
s in the package that way?
./R/closed_curly_linter.R: message = "Closing curly-braces should always be on their own line, unless it's followed by an else.", # nolint
./R/function_left_parentheses.R:function_left_parentheses_linter <- function(source_file) { # nolint: function_left_parentheses_linter.
./R/get_source_expressions.R: })(prev_locs == lag(next_locs)) # nolint
./R/open_curly_linter.R: message = "Opening curly braces should never go on their own line and should always be followed by a new line.", # nolint
./R/lint.R: expr_lints <- flatten_lints(linters[[linter]](expr)) # nolint
./tests/testthat/test-deprecated.R: expect_quiet_lint("'/blah/file.txt'", # nolint
./tests/testthat/test-lint_package.R:# lint_package(".") # nolint
./tests/testthat/test-lint_package.R:# lint_package(path_to_package) # nolint
./tests/testthat/test-rstudio_markers.R: expect_equal(marker3$basePath, "test") # nolint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Closes #668