Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jackwasey opened this issue Feb 27, 2016 · 1 comment

Comments

@jackwasey
Copy link

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")
@fangly
Copy link
Contributor

fangly commented May 3, 2017

Thank you jackwasey. There was indeed an issue with no_tab_linter() not handling line numbers correctly. This manifested when there were commented lines in the content to lint. This is fixed in 65b312f .

@fangly fangly closed this as completed May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants