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

Duplicate lints for line_length_linter #681

Closed
AshesITR opened this issue Dec 6, 2020 · 0 comments · Fixed by #682
Closed

Duplicate lints for line_length_linter #681

AshesITR opened this issue Dec 6, 2020 · 0 comments · Fixed by #682

Comments

@AshesITR
Copy link
Collaborator

AshesITR commented Dec 6, 2020

Found during vignette writing for #660

lintr::lint("x <- 2 # -------------------------------------------------------------------------------\n", 
            parse_settings = FALSE)
#> <text>:1:1: style: Lines should not be more than 80 characters.
#> x <- 2 # -------------------------------------------------------------------------------
#> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#> <text>:1:1: style: Lines should not be more than 80 characters.
#> x <- 2 # -------------------------------------------------------------------------------
#> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Created on 2020-12-06 by the reprex package (v0.3.0)

Happens only if the offending line contains R code.
I assume the problem is we lint over full_parsed_content plus parsed_content.

AshesITR added a commit that referenced this issue Dec 6, 2020
fixes #681

also added a regression test.
AshesITR added a commit that referenced this issue Dec 6, 2020
* fix duplicate line_length lints.

fixes #681

also added a regression test.

* update NEWS.md

* incorporate suggestions
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

Successfully merging a pull request may close this issue.

1 participant