Skip to content

spaces_inside_linter() doesn't lint spaces after [[ #1673

Closed
@IndrajeetPatil

Description

@IndrajeetPatil
library(lintr)

lint(
  text = "x[[ 1L]]",
  linters = spaces_inside_linter()
)

lint(
  text = "x[[1L ]]",
  linters = spaces_inside_linter()
)
#> <text>:1:6: style: [spaces_inside_linter] Do not place spaces before square brackets.
#> x[[1L ]]
#>      ^

lint(
  text = "x[[ 1L ]]",
  linters = spaces_inside_linter()
)
#> <text>:1:7: style: [spaces_inside_linter] Do not place spaces before square brackets.
#> x[[ 1L ]]
#>       ^

Created on 2022-10-11 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    false-negativecode that should lint, but doesn't

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions