Skip to content

Add specific linter information to all # nolints in lintr #672

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

Closed
AshesITR opened this issue Dec 4, 2020 · 4 comments · Fixed by #725
Closed

Add specific linter information to all # nolints in lintr #672

AshesITR opened this issue Dec 4, 2020 · 4 comments · Fixed by #725
Labels
internals Issues related to inner workings of lintr, i.e., not user-visible
Milestone

Comments

@AshesITR
Copy link
Collaborator

AshesITR commented Dec 4, 2020

how about a follow-up issue for tagging all # nolints in the package that way?

./R/closed_curly_linter.R:                    message = "Closing curly-braces should always be on their own line, unless it's followed by an else.", # nolint
./R/function_left_parentheses.R:function_left_parentheses_linter <- function(source_file) { # nolint: function_left_parentheses_linter.
./R/get_source_expressions.R:    })(prev_locs == lag(next_locs)) # nolint
./R/open_curly_linter.R:                    message = "Opening curly braces should never go on their own line and should always be followed by a new line.", # nolint
./R/lint.R:        expr_lints <- flatten_lints(linters[[linter]](expr)) # nolint
./tests/testthat/test-deprecated.R:  expect_quiet_lint("'/blah/file.txt'", # nolint
./tests/testthat/test-lint_package.R:# lint_package(".") # nolint
./tests/testthat/test-lint_package.R:# lint_package(path_to_package) # nolint
./tests/testthat/test-rstudio_markers.R:  expect_equal(marker3$basePath, "test") # nolint

Originally posted by @MichaelChirico in #669 (comment)

Requires #660

@russHyde russHyde added the internals Issues related to inner workings of lintr, i.e., not user-visible label Dec 9, 2020
@russHyde
Copy link
Collaborator

russHyde commented Jan 28, 2021

Agreed. I suspect that some of these "# nolint"s can be removed anyway.

@AshesITR AshesITR added this to the 3.0.0 milestone Jan 31, 2021
@AshesITR
Copy link
Collaborator Author

Adding to 3.0.0 so we publish code showing off best practice with lintr.

@MichaelChirico
Copy link
Collaborator

@AshesITR are you working on this now? if not i'll take it up

@AshesITR
Copy link
Collaborator Author

Haven't started it, feel free to take it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Issues related to inner workings of lintr, i.e., not user-visible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants