tests/testthat/source/R/sample_funs2.R

#duplicate function
f2 = function(){
  1
}
f2 = function(){
  ggplot()
}


#from roxygen, not in DESCRIPTION
warn_in_desc = function(){
  x = rd_roclet()
}


#private function, should override dplyr::mutate
mutate = function(){
  filter("foo")
}

#private function, should override dplyr::filter
filter = function(){
  1
}

#private function, should not conflict with autoimport:::assert
assert = function(){
  1
}


#function with inner function
#' @importFrom dplyr filter
foobar = function(){
  filter <- base::identity #inner function, should override autoimport::filter
  glimpse = function() 1

  filter("foo")
  glimpse("foo")
  abcdefgh()
  wxyz()
  bind_rows()
}


#this is
#a trailing comment
#with only one empty line at EOF

Try the autoimport package in your browser

Any scripts or data that you put into this service are public.

autoimport documentation built on April 4, 2025, 4:47 a.m.