Skip to content

wrong line number reported when tab characters are detected and code begins with comments #134

@jackwasey

Description

@jackwasey

It seems to be that it doesn't count initial comment lines. It seems like github might remove the critical tab in the following code block:

/tmp/tab.R

# comments
# comments
# comments
# comments
# comments
# comments
# comments

some_function <- function() {
        print("this line preceded by tab")
}

then
lintr::lint("/tmp/tab.R")

Giving me:

tab.R:2:1: style: Use two spaces to indent, never tabs.
        print("this line preceded by tab")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions