lintr icon indicating copy to clipboard operation
lintr copied to clipboard

lint missing argument name

Open TanguyBarthelemy opened this issue 1 year ago • 1 comments

Related to #2562

Is it possible to add a new lintr to ensure that function calls have no missing or default arguments?

For example, the following code will be marked by {lintr}:

f <- function(x, y) return(x + y)
g <- function(x) return(f(1, x))

and the suggested correction would be:

f <- function(x, y) return(x + y)
g <- function(x) return(f(x = 1, y = x))

Maybe this kind of lintr already exists.

TanguyBarthelemy avatar Jul 10 '24 07:07 TanguyBarthelemy