Skip to content

Commit f048a33

Browse files
remove all edge case transformers and see speed implications
1 parent e1688f5 commit f048a33

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

R/style-guides.R

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,13 @@ tidyverse_style <- function(scope = "tokens",
9898
math_token_spacing$zero,
9999
math_token_spacing$one
100100
),
101-
style_space_around_tilde = partial(
102-
style_space_around_tilde,
103-
strict = strict
104-
),
105101
spacing_around_op = purrr::partial(set_space_around_op,
106102
strict = strict
107103
),
108104
remove_space_after_opening_paren,
109105
remove_space_after_excl,
110-
set_space_after_bang_bang,
111106
remove_space_before_dollar,
112107
remove_space_after_fun_dec,
113-
remove_space_around_colons,
114108
start_comments_with_space = partial(start_comments_with_space,
115109
force_one = start_comments_with_one_space
116110
),
@@ -120,9 +114,7 @@ tidyverse_style <- function(scope = "tokens",
120114
} else {
121115
add_space_before_comments
122116
},
123-
set_space_between_levels,
124-
set_space_between_eq_sub_and_comma,
125-
set_space_in_curly_curly
117+
set_space_between_levels
126118
)
127119
}
128120

@@ -134,8 +126,6 @@ tidyverse_style <- function(scope = "tokens",
134126
set_line_break_before_curly_opening,
135127
remove_line_break_before_round_closing_after_curly =
136128
if (strict) remove_line_break_before_round_closing_after_curly,
137-
remove_line_breaks_in_fun_dec =
138-
if (strict) remove_line_breaks_in_fun_dec,
139129
style_line_break_around_curly = partial(
140130
style_line_break_around_curly,
141131
strict
@@ -157,21 +147,12 @@ tidyverse_style <- function(scope = "tokens",
157147
)
158148
},
159149
purrr::partial(remove_line_break_in_fun_call, strict = strict),
160-
add_line_break_after_pipe = if (strict) add_line_break_after_pipe,
161-
set_linebreak_after_ggplot2_plus = if (strict) set_linebreak_after_ggplot2_plus
150+
add_line_break_after_pipe = if (strict) add_line_break_after_pipe
162151
)
163152
}
164153

165154
token_manipulators <- if ("tokens" %in% scope) {
166-
lst(
167-
fix_quotes,
168-
force_assignment_op,
169-
resolve_semicolon,
170-
add_brackets_in_pipe,
171-
remove_terminal_token_before_and_after,
172-
wrap_if_else_while_for_fun_multi_line_in_curly =
173-
if (strict) wrap_if_else_while_for_fun_multi_line_in_curly
174-
)
155+
lst()
175156
}
176157

177158
style_guide_name <- "styler::tidyverse_style@https://github.com/r-lib"

0 commit comments

Comments
 (0)