Skip to content

expect_null_linter - #887

Merged
AshesITR merged 36 commits into
masterfrom
expect-null
Mar 12, 2022
Merged

AshesITR merged 36 commits into
masterfrom
expect-null

Conversation

@MichaelChirico

@MichaelChirico MichaelChirico commented Nov 15, 2021 •

Copy link
Copy Markdown
Collaborator

Part of #884

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

Comment thread R/google_linters.R Outdated
@@ -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
Copy Markdown
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

Comment thread R/expect_null_linter.R Resolved
Comment thread .Rbuildignore Resolved
@MichaelChirico

Copy link
Copy Markdown
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.

Comment thread R/google_linters.R Resolved
Comment thread R/expect_null_linter.R Resolved
@MichaelChirico

Copy link
Copy Markdown
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
Copy Markdown
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?)

Comment thread R/expect_null_linter.R Resolved
Comment thread R/expect_null_linter.R Resolved
@AshesITR

Copy link
Copy Markdown
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

Comment thread inst/lintr/linters.csv Resolved
@MichaelChirico MichaelChirico changed the title #GoogleLinters expect_null_linter expect_null_linter Mar 12, 2022
Comment thread R/expect_null_linter.R Resolved
@AshesITR

Copy link
Copy Markdown
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
@MichaelChirico MichaelChirico mentioned this pull request Mar 20, 2022
38 tasks done
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