Skip to content

Commit c6b978b

Browse files
Merge pull request #1028 from IndrajeetPatil/code_cleanup_oct
Clean up a few more lints
2 parents 6dd25a5 + 6bd3e0f commit c6b978b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

R/addins.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ style_active_file <- function() {
7575
paste0(ensure_last_n_empty(out), collapse = "\n"),
7676
id = context$id
7777
)
78-
if (save_after_styling_is_active() == TRUE && context$path != "") {
78+
if (save_after_styling_is_active() && context$path != "") {
7979
rstudioapi::documentSave(context$id)
8080
}
8181
rstudioapi::setCursorPosition(context$selection[[1L]]$range)
@@ -138,7 +138,7 @@ style_selection <- function() {
138138
), collapse = "\n"),
139139
id = context$id
140140
)
141-
if (save_after_styling_is_active() == TRUE && context$path != "") {
141+
if (save_after_styling_is_active() && context$path != "") {
142142
invisible(rstudioapi::documentSave(context$id))
143143
}
144144
}

R/stylerignore.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ apply_stylerignore <- function(flattened_pd) {
112112
# cannot rely on flattened_pd$text == option_read("styler.ignore_start")
113113
# because if the marker logic is not correct (twice off in a row), we'll
114114
# get it wrong.
115-
to_ignore <- flattened_pd$stylerignore == TRUE
115+
to_ignore <- flattened_pd$stylerignore
116116
not_first <- flattened_pd$stylerignore == lag(
117117
flattened_pd$stylerignore,
118118
default = FALSE

0 commit comments

Comments
 (0)