-
Notifications
You must be signed in to change notification settings - Fork 184
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
Allow .onLoad and other special functions regardless of name style #614
Allow .onLoad and other special functions regardless of name style #614
Conversation
Also remove relevant # nolint in lintrs own .onLoad. fixes #500
@@ -240,6 +240,7 @@ is_base_function <- function(x) { | |||
x %in% base_funs | |||
} | |||
|
|||
# see ?".onLoad" and ?"Startup" |
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, very good idea to note where they come from :-)
@MichaelChirico can you re-approve (merging master wasn't clean)? Thanks! |
".Last" | ||
) | ||
|
||
is_special_function <- function(x) { |
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.
hmm I guess we need a test for this 😅 I'm seeing this on current master when trying to do #597:
R/zzz.R:185:1: style: Variable and function name style should be snake_case.
.onLoad <- function(libname, 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.
The issue is that strip_names
removes the leading .
. So actually we need to search for onLoad
etc.
Also remove relevant # nolint in lintrs own .onLoad.
fixes #500