Skip to content

# nolint next special comment #1791

@jmbarbone

Description

@jmbarbone

Is there any interest in using a # nolint next special comment to be applied to the next line of code?

Current special comments can look kind of intrusive and awkward for some lines. Using a next comment may look and feel a bit more natural.

# nolint

# nolint: line_length_linter. Lorem ipsum dolor sit amet, ornare ex et himenaeos aenean commodo auctor accumsan gravida.

MyFunctionName <- function( # nolint: object_name_linter.
    a = 1,
    b = 2
) {
  a + b
}

# nolint start ... end

# nolint start: line_length_linter.
# Lorem ipsum dolor sit amet, ornare ex et himenaeos aenean commodo auctor accumsan gravida.
# nolint end: line_length_linter.

# nolint start: object_name_linter.
MyFunctionName <- function( 
    # nolint end: object_name_linter.
    a = 1,
    b = 2
) {
  a + b
}

# nolint next

# nolint next: line_length_linter.
# Lorem ipsum dolor sit amet, ornare ex et himenaeos aenean commodo auctor accumsan gravida.

# nolint next: object_name_linter.
MyFunctionName <- function( 
    a = 1,
    b = 2
) {
  a + b
}

I'd be happy enough with a next line only implementation, but it might open up a possible request of # nolint next 5.

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