Skip to content

[BUG] add_fct could generate unparsable file #1207

@VincentGuyader

Description

@VincentGuyader

In golem, when a user runs golem::add_fct(name = "ma fonction") with a space in the name, it generates both a file with a space in its name and a function placeholder that includes the space. This results in invalid code.

For example:

#' ma fonction 
#'
#' @description A fct function
#'
#' @return The return value, if any, from executing the function.
#'
#' @noRd
ma fonction <- function() {
}

We'll take this opportunity to enforce lowercase conversion and transliteration in the file name.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions