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

expect_null_linter #887

Merged
merged 36 commits into from
Mar 12, 2022
Merged

expect_null_linter #887

merged 36 commits into from
Mar 12, 2022

Conversation

MichaelChirico
Copy link
Collaborator

@MichaelChirico MichaelChirico commented Nov 15, 2021

Part of #884

Hits expect_equal(x, NULL), which should be expect_null(x)

@@ -0,0 +1,10 @@
#' @title Linters for the Google extension to the tidyverse style guide
#'
#' Google uses a fork of the tidyverse style guide, pursuant to which
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @michaelquinn32 for copy here & in NEWS

.Rbuildignore Outdated Show resolved Hide resolved
@MichaelChirico
Copy link
Collaborator Author

Patch coverage drop is from xp_or being added but not used yet. It will be used in later linters, so I think it's fine to ignore in this PR.

R/google_linters.R Outdated Show resolved Hide resolved
R/expect_null_linter.R Outdated Show resolved Hide resolved
@MichaelChirico
Copy link
Collaborator Author

@AshesITR are we ready to start the stream of google linters now? if so I'll rebase this to the doc changes and start from here

@MichaelChirico MichaelChirico requested a review from AshesITR March 11, 2022 21:38
@MichaelChirico
Copy link
Collaborator Author

I'm immediately seeing the benefit of #916... a bit hard to know if I've integrated this new linter with the new approach correctly (IIUC the main thing is to be sure to add the linter+tags to the inst/lintr/linters.csv file?)

R/expect_null_linter.R Outdated Show resolved Hide resolved
@AshesITR
Copy link
Collaborator

I'm immediately seeing the benefit of #916... a bit hard to know if I've integrated this new linter with the new approach correctly (IIUC the main thing is to be sure to add the linter+tags to the inst/lintr/linters.csv file?)

Looks good. One last thing necessary for new tags is creating a documentation for them in R/linter_tag_docs.R

@MichaelChirico MichaelChirico changed the title #GoogleLinters expect_null_linter expect_null_linter Mar 12, 2022
R/expect_null_linter.R Outdated Show resolved Hide resolved
@AshesITR
Copy link
Collaborator

LGTM without the dep on glue::glue
NB if no namespace import is desired, usethis::use_package() is a very convenient helper.

@AshesITR AshesITR merged commit 4148ebd into master Mar 12, 2022
@AshesITR AshesITR deleted the expect-null branch March 12, 2022 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants