Skip to content

curly braces linter and comments #188

@wamserma

Description

@wamserma

The curly braces linter wants a newline after an opening curly brace, not accepting comments there.

Example

if ("P" != "NP") { # what most people expect
    print("Cryptomania is possible")
} else { # what would make a lot of people sad
    print("we live in Algorithmica")
}

lintr output:

R\test.R:7:22: style: Opening curly braces should never go on their own line and should always be followed by a new line.
    if ("P" != "NP") { # what most people expect
                     ^
R\test.R:9:12: style: Opening curly braces should never go on their own line and should always be followed by a new line.
    } else { # what would make a lot of people sad

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions