# will produce lints
lint(
text = "list(x = 1, x = 2)",
linters = duplicate_argument_linter()
)
lint(
text = "fun(arg = 1, arg = 2)",
linters = duplicate_argument_linter()
)
# okay
lint(
text = "list(x = 1, x = 2)",
linters = duplicate_argument_linter(except = "list")
)
lint(
text = "df %>% dplyr::mutate(x = a + b, x = x + d)",
linters = duplicate_argument_linter()
)
Run the code above in your browser using DataLab