# will produce lints
lint(
text = 'expect_equal(names(x), "a")',
linters = expect_named_linter()
)
# okay
lint(
text = 'expect_named(x, "a")',
linters = expect_named_linter()
)
lint(
text = 'expect_equal(colnames(x), "a")',
linters = expect_named_linter()
)
lint(
text = 'expect_equal(dimnames(x), "a")',
linters = expect_named_linter()
)
Run the code above in your browser using DataLab