# will produce lints
lint(
text = "x <- 1",
linters = implicit_integer_linter()
)
lint(
text = "x[2]",
linters = implicit_integer_linter()
)
lint(
text = "1:10",
linters = implicit_integer_linter()
)
# okay
lint(
text = "x <- 1.0",
linters = implicit_integer_linter()
)
lint(
text = "x <- 1L",
linters = implicit_integer_linter()
)
lint(
text = "x[2L]",
linters = implicit_integer_linter()
)
lint(
text = "1:10",
linters = implicit_integer_linter(allow_colon = TRUE)
)
Run the code above in your browser using DataLab