Skip to content

Commit

Permalink
minor consistency edits
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Jan 25, 2021
1 parent 3f3ab1c commit 4e8a248
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
style tokens, you had to always also style spaces, indention, line breaks as
well (#705, #707).

- New argument `transformer_drop` in `create_style_guide()` to be populated with
new helper function `specify_transformer_dropping()` for specifying conditions
- New argument `transformers_drop` in `create_style_guide()` to be populated with
new helper function `specify_transformers_drop()` for specifying conditions
under which transformers are not going to be used and can therefore be
omitted without effecting the result of styling (#711).

Expand Down
2 changes: 1 addition & 1 deletion R/style-guides.R
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ create_style_guide <- function(initialize = default_style_guide_attributes,
#' to add a rule for when to drop it, it will not be dropped. If we required to
#' specify the complement (which tokens must be present for the transformer to
#' be kept), the transformer would be silently removed, which is less save.
#' @param spaces,indention,line_breaks,tokens Each a list or `NULL` where
#' @param spaces,indention,line_breaks,tokens Each a list (or `NULL`) where
#' the name of each element is the concerning transformer, the value is an
#' unnamed vector with tokens that match the rule. See 'Examples'.
#'
Expand Down
6 changes: 4 additions & 2 deletions R/testing.R
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ cache_more_specs_default <- function() {
cache_more_specs(include_roxygen_examples = TRUE, base_indention = 0)
}

#' Check if the transformers_drop in [create_style_guide()] is consistent
#' with the transformers specified.
#' Test `transformers_drop` for consistency
#'
#' Check if the argument `transformers_drop` in [create_style_guide()] is
#' consistent with the transformers specified in that function.
#' @param transformers The output of [create_style_guide()] we want to test.
#' @keywords internal
test_transformers_drop <- function(transformers) {
Expand Down
2 changes: 1 addition & 1 deletion man/specify_transformers_drop.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/test_transformers_drop.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e8a248

Please sign in to comment.