Skip to content

Commit ea1cc76

Browse files
Merge branch 'master' into communication
2 parents 32f659c + 8f42440 commit ea1cc76

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

NEWS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
## Major changes
44

5-
- blank lines in function calls and headers are now removed, for the former
6-
only when there are no comments before or after the blank line
7-
(#629, #630, #635).
8-
- added an option for disabling all communication when using the package
9-
(styler.quiet) (#640).
5+
- blank lines in function calls and headers are now removed, for the former only
6+
when there are no comments before or after the blank line (#629, #630, #635).
7+
- `style_file()` and friends gain argument `dry` to control if changes should
8+
be applied to files or not (#634).
9+
- added an option for disabling all communication when using the package
10+
(styler.quiet) (#640).
1011

1112
## Minor chnages and fixes
1213

R/io.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ transform_utf8_one <- function(path, fun, dry) {
3333
if (!identical) {
3434
if (dry == "fail") {
3535
rlang::abort(
36-
paste0("File `", path, "` would be modified by styler and `dry` = 'fail'."),
36+
paste0(
37+
"File `", path, "` would be modified by styler and argument dry",
38+
" is set to 'fail'."
39+
),
3740
class = "dryError"
3841
)
3942
} else if (dry == "on") {

R/ui-styling.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ NULL
2222
#' @inheritParams prettify_pkg
2323
#' @section Warning:
2424
#' This function overwrites files (if styling results in a change of the
25-
#' code to be formatted). It is strongly suggested to only style files
26-
#' that are under version control or to create a backup copy.
25+
#' code to be formatted and `dry = "off"`). It is strongly suggested to only
26+
#' style files that are under version control or to create a backup copy.
2727
#'
2828
#' We suggest to first style with `scope < "tokens"` and inspect and commit
2929
#' changes, because these changes are guaranteed to leave the abstract syntax

man/style_dir.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/style_file.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/style_pkg.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)