Skip to content

Commit 6f49c4b

Browse files
Merge pull request #294 from lorenzwalthert/spelling
- Spelling via devtools::spell_check() (#294).
2 parents bd67a11 + 13698f6 commit 6f49c4b

26 files changed

+34
-34
lines changed

R/communicate.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' Communiate a warning if necessary
1+
#' Communicate a warning if necessary
22
#'
33
#' If roundtrip verification was not possible, issue a warning to review the
44
#' changes carefully.

R/expr-is.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ contains_else_expr <- function(pd) {
3939
#' Checks whether an else expression in a nest needs braces. Note that for
4040
#' if-else-if expressions, there is no need to add braces since the if in
4141
#' else-if will be visited separately with the visitor. This applies to all
42-
#' conditional statents with more than one alternative.
42+
#' conditional statmements with more than one alternative.
4343
#' @param pd A parse table
4444
contains_else_expr_that_needs_braces <- function(pd) {
4545
else_idx <- which(pd$token == "ELSE")

R/indent.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ pd_is_multi_line <- function(pd) {
194194

195195
#' Update the newlines attribute
196196
#'
197-
#' As we work only with the `lag_newlines` attribute for setting the linebreaks,
198-
#' (R/rules-line_break.R) but we need `newlines` to determine
197+
#' As we work only with the `lag_newlines` attribute for setting the line
198+
#' breaks, (R/rules-line_break.R) but we need `newlines` to determine
199199
#' whether or not to set `spaces` (R/rules-spacing.R), we have to update the
200200
#' attribute. We cannot simply use `dplyr::lead(pd$lag_newlines)` since we would
201201
#' lose information for the last token. `spaces` is left as is in

R/parse.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ get_parse_data <- function(text, include_text = TRUE, ...) {
3737

3838
#' Add column `pos_id` and `short`
3939
#'
40-
#' Addds column `pos_id` and `short` to a flat parse table.
40+
#' Adds column `pos_id` and `short` to a flat parse table.
4141
#' @param pd A flat parse table
4242
add_id_and_short <- function(pd) {
4343
pd$pos_id <- seq2(1L, nrow(pd))

R/relevel.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ relocate_eq_assign <- function(pd) {
130130
#' within a *nest* (nested parse table at one level of nesting).
131131
#' Note that one assignment expression (such as "a = b = c") can include
132132
#' multiple assignment operators, an assignment involves just one assignment
133-
#' oparator.
133+
#' operator.
134134
#' For the relocation of assignment expressions that contain `EQ_ASSIGN` within
135135
#' a *nest*, we need to first find the expressions that contain `=` and then
136136
#' split the *nest* into parse tables each containing one such assignment
137137
#' expression and then relocate each of them separately.
138138
#' We can't do all of them together because:
139139
#'
140140
#' * An assignment can contain more than just three tokens, e.g. (a <- b <- c).
141-
#' * Two assignemnts can be in the same nest although they don't belong to the
141+
#' * Two assignments can be in the same nest although they don't belong to the
142142
#' same assignment (if-else statement).
143143
#'
144144
#' Please refer to the section 'Examples' in [relocate_eq_assign()] for details.
@@ -160,7 +160,7 @@ relocate_eq_assign_nest <- function(pd) {
160160
#'
161161
#' Two assignment tokens `EQ_ASSIGN` belong to the same block if they are not
162162
#' separated by more than one token. Token between `EQ_ASSIGN` tokens belong
163-
#' to the `EQ_ASSIGN` token occuring before them, except the token right before
163+
#' to the `EQ_ASSIGN` token occurring before them, except the token right before
164164
#' `EQ_ASSING` already belongs to the `EQ_ASSING` after it.
165165
#' @param pd A parse table.
166166
find_block_id <- function(pd) {

R/rules-other.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ add_brackets_in_pipe_one <- function(pd, pos) {
2424
#' Wrap an if-else statement in curly braces if it is not already wrapped in
2525
#' a such.
2626
#' @param pd A parse table.
27-
#' @param indent_by The amont of spaces used to indent an expression in curly
27+
#' @param indent_by The amount of spaces used to indent an expression in curly
2828
#' braces. Used for unindention.
2929
wrap_if_else_multi_line_in_curly <- function(pd, indent_by = 2) {
3030
if (is_cond_expr(pd)) {

R/serialized_tests.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ stop_insufficient_r_version <- function() {
229229

230230
#' Generate a comprehensive collection test cases for comment / insertion
231231
#' interaction
232-
#' Test consist of if / if-else / if-else-if-else caes, paired with various
232+
#' Test consist of if / if-else / if-else-if-else cases, paired with various
233233
#' line-break and comment configurations. Used for internal testing.
234234
#' @return
235235
#' The function is called for its side effects, i.e. to write the

R/token-create.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ create_pos_ids <- function(pd, pos, by = 0.1, after = FALSE, n = 1) {
7474
#' Find legit starting value for a new positional id
7575
#'
7676
#' Looks at the current nest as well as into its children (if necessary) to make
77-
#' sure the right id is returned. Otherise, ordering of tokens might not be
77+
#' sure the right id is returned. Otherwise, ordering of tokens might not be
7878
#' preserved.
7979
#' @param direction Derived from `after`. `1` if `after = TRUE`, `-1` otherwise.
8080
#' @param candidates The `pos_ids` of the candidates that origin from other

R/transform-files.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ apply_transformers <- function(pd_nested, transformers) {
167167

168168

169169

170-
#' Check whether a roundtip verification can be carried out
170+
#' Check whether a roundtrip verification can be carried out
171171
#'
172172
#' If scope was set to "line_breaks" or lower (compare [tidyverse_style()]),
173173
#' we can compare the expression before and after styling and return an error if

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ add_spaces <- function(n) {
2929
#' Invoke a system command
3030
#'
3131
#' Wraps a system command into [shell()] or [system()], depending on the
32-
#' os.
32+
#' operating system.
3333
#' @param sys_call The call to be executed.
3434
#' @param ... Arguments passed to [shell()] or [system()].
3535
calls_sys <- function(sys_call, ...) {

0 commit comments

Comments
 (0)