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