Skip to contents

It is preferable to register routines for efficiency and safety.

Usage

routine_registration_linter()

Examples

# will produce lints
lint(
  text = '.Call("cpp_routine", PACKAGE = "mypkg")',
  linters = routine_registration_linter()
)
#> ::warning file=<text>,line=1,col=7::file=<text>,line=1,col=7,[routine_registration_linter] Register your native code routines with useDynLib and R_registerRoutines().

lint(
  text = '.Fortran("f_routine", PACKAGE = "mypkg")',
  linters = routine_registration_linter()
)
#> ::warning file=<text>,line=1,col=10::file=<text>,line=1,col=10,[routine_registration_linter] Register your native code routines with useDynLib and R_registerRoutines().

# okay
lint(
  text = ".Call(cpp_routine)",
  linters = routine_registration_linter()
)

lint(
  text = ".Fortran(f_routine)",
  linters = routine_registration_linter()
)