Skip to content

brace_linter exception opening exception should apply for preceding comma-then-comment, too #1433

@MichaelChirico

Description

@MichaelChirico

Compare:

lintr::lint('
test_that(
  "Some longer test description",
  {
    # Do test stuff
  }
)',
lintr::brace_linter())

vs

lintr::lint('
test_that(
  "Some longer test description", # comment
  {
    # Do test stuff
  }
)',
lintr::brace_linter())
# <text>:4:3: style: [brace_linter] Opening curly braces should never go on their own line and should always be followed by a new line.
#   {
#   ^

The exception should apply to the latter case as well

Metadata

Metadata

Labels

false-positivecode that shouldn't lint, but does

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions