Skip to content

Commit d1491c2

Browse files
move shared constant to the right file (#2427)
1 parent 9dd4f11 commit d1491c2

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

R/object_name_linter.R

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -174,25 +174,6 @@ check_style <- function(nms, style, generics = character()) {
174174
conforming
175175
}
176176

177-
# see ?".onLoad", ?Startup, and ?quit. Remove leading dot to match behavior of strip_names().
178-
# All of .onLoad, .onAttach, and .onUnload are used in base packages,
179-
# and should be caught in is_base_function; they're included here for completeness / stability
180-
# (they don't strictly _have_ to be defined in base, so could in principle be removed).
181-
# .Last.sys and .First.sys are part of base itself, so aren't included here.
182-
special_funs <- c(
183-
".onLoad",
184-
".onAttach",
185-
".onUnload",
186-
".onDetach",
187-
".Last.lib",
188-
".First",
189-
".Last"
190-
)
191-
192-
is_special_function <- function(x) {
193-
x %in% special_funs
194-
}
195-
196177
loweralnum <- rex(one_of(lower, digit))
197178
upperalnum <- rex(one_of(upper, digit))
198179

R/shared_constants.R

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,22 @@ purrr_mappers <- c(
309309
"map_raw", "map_lgl", "map_int", "map_dbl", "map_chr", "map_vec",
310310
"map_df", "map_dfr", "map_dfc"
311311
)
312+
313+
# see ?".onLoad", ?Startup, and ?quit.
314+
# All of .onLoad, .onAttach, and .onUnload are used in base packages,
315+
# and should be caught in is_base_function; they're included here for completeness / stability
316+
# (they don't strictly _have_ to be defined in base, so could in principle be removed).
317+
# .Last.sys and .First.sys are part of base itself, so aren't included here.
318+
special_funs <- c(
319+
".onLoad",
320+
".onAttach",
321+
".onUnload",
322+
".onDetach",
323+
".Last.lib",
324+
".First",
325+
".Last"
326+
)
327+
328+
is_special_function <- function(x) {
329+
x %in% special_funs
330+
}

0 commit comments

Comments
 (0)