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

ns-qualify rex in tests #1957

Merged
merged 2 commits into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion tests/testthat/test-knitr_formats.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ regexes <- list(
quotes = rex::rex("Only use double-quotes."),
trailing = rex::rex("Trailing blank lines are superfluous."),
trailws = rex::rex("Trailing whitespace is superfluous."),
indent = rex("Indentation should be")
indent = rex::rex("Indentation should be")
)

test_that("it handles dir", {
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-object_name_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ test_that("object_name_linter won't fail if an imported namespace is unavailable
test_that("object_name_linter supports custom regexes", {
# disables default styles
linter <- object_name_linter(
regexes = c("shinyModule" = rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end))
regexes = c("shinyModule" = rex::rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end))
)
msg <- rex::rex("Variable and function name style should match shinyModule.")
linter2 <- object_name_linter(
styles = c("snake_case", "symbols"),
regexes = c("shinyModule" = rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end))
regexes = c("shinyModule" = rex::rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end))
)
msg2 <- rex::rex("Variable and function name style should match snake_case, symbols or shinyModule.")

Expand Down