-
Notifications
You must be signed in to change notification settings - Fork 186
enable open_curly_linter in .lintr #613
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
Conversation
This is already part of the default linters, no need to manually add it. |
R/expect_lint.R:54:28: style: Opening curly braces should never go on their own line and should always be followed by a new line. lint_str <- if (n_lints) {paste0(c("", lints), collapse="\n")} else {""}
^ R/expect_lint.R:54:71: style: Opening curly braces should never go on their own line and should always be followed by a new line. lint_str <- if (n_lints) {paste0(c("", lints), collapse="\n")} else {""}
^ R/get_source_expressions.R:46:5: style: Opening curly braces should never go on their own line and should always be followed by a new line. {
^ R/get_source_expressions.R:319:44: style: Opening curly braces should never go on their own line and should always be followed by a new line. tab_cols <- lapply(tab_cols, function(x) {if (x[[1L]] < 0L) {NA} else {x}})
^ R/get_source_expressions.R:319:63: style: Opening curly braces should never go on their own line and should always be followed by a new line. tab_cols <- lapply(tab_cols, function(x) {if (x[[1L]] < 0L) {NA} else {x}})
^ R/get_source_expressions.R:319:73: style: Opening curly braces should never go on their own line and should always be followed by a new line. tab_cols <- lapply(tab_cols, function(x) {if (x[[1L]] < 0L) {NA} else {x}})
^ R/spaces_inside_linter.R:43:72: style: Opening curly braces should never go on their own line and should always be followed by a new line. column_number = if (substr(line, start, start) == " ") {start} else {start + 1L},
^ R/spaces_inside_linter.R:43:85: style: Opening curly braces should never go on their own line and should always be followed by a new line. column_number = if (substr(line, start, start) == " ") {start} else {start + 1L},
^ R/unneeded_concatenation_linter.R:24:35: style: Opening curly braces should never go on their own line and should always be followed by a new line. message = if (num_args) {msg_const} else {msg_empty},
^ R/unneeded_concatenation_linter.R:24:52: style: Opening curly braces should never go on their own line and should always be followed by a new line. message = if (num_args) {msg_const} else {msg_empty},
^ |
Hmm, the linter bot seems to have found lints that the command in the issue did not:
This also didn't detect those lints that the bot found:
The lints look correct though, any idea? |
Well, I can reproduce locally with this at least:
with the new settings. I'll edit the issue descriptions... |
R/get_source_expressions.R:318:44: style: Opening curly braces should never go on their own line and should always be followed by a new line. tab_cols <- lapply(tab_cols, function(x) {if (x[[1L]] < 0L) NA else x})
^ |
Closes #596
There are already no lints for this linter, we just need to enable it in the options: