Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint missing argument name #2626

Open
TanguyBarthelemy opened this issue Jul 10, 2024 · 1 comment
Open

lint missing argument name #2626

TanguyBarthelemy opened this issue Jul 10, 2024 · 1 comment

Comments

@TanguyBarthelemy
Copy link

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.

@MichaelChirico
Copy link
Collaborator

Related: #2627

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants