|
1 | | - |
2 | | -# styler 1.2.0.9000 |
| 1 | +# styler 1.2.9001 |
3 | 2 |
|
4 | 3 | ## Breaking changes |
5 | 4 |
|
6 | | -* `style_pkg()` and `style_dir()` gain a new argument `exclude_dirs` to exclude |
7 | | - directories from styling, by default `renv` and `packrat`. Note that the |
8 | | - defaults won't change the behavior of `style_pkg()` because it does anyways |
| 5 | +* `style_pkg()` and `style_dir()` gain a new argument `exclude_dirs` to exclude |
| 6 | + directories from styling, by default `renv` and `packrat`. Note that the |
| 7 | + defaults won't change the behavior of `style_pkg()` because it does anyways |
9 | 8 | does not style these directories and they were set for consistency. |
10 | | - |
11 | | -* `style_file()` and friends now strip `./` in file paths returned invisibly, |
| 9 | + |
| 10 | +* `style_file()` and friends now strip `./` in file paths returned invisibly, |
12 | 11 | i.e. `./script.R` becomes `script.R` (#568). |
13 | 12 |
|
14 | 13 | ## New features |
15 | 14 |
|
16 | | -* ignore certain lines using `# styler: off` and `#styler: on` or custom |
17 | | - markers, see `help("stylerignore")` (#560). |
| 15 | +* ignore certain lines using `# styler: off` and `#styler: on` or custom |
| 16 | + markers, see `?stylerignore` (#560). |
18 | 17 |
|
19 | 18 | * styler caches results of styling, so applying styler to code it has styled |
20 | 19 | before will be instantaneous. This brings large speed boosts in many |
21 | 20 | situations, e.g. when `style_pkg()` is run but only a few files have changed |
22 | 21 | since the last styling or when using the [styler pre-commit |
23 | | - hook](https://github.com/lorenzwalthert/precommit). Because styler caches |
24 | | - by expression, you will also get speed boosts in large files with many |
25 | | - expressions when you only change a few o them. See `help("caching")` for |
26 | | - details (#538, #578). |
27 | | - |
28 | | -* `create_style_guide()` gains two arguments `style_guide_name` and |
29 | | - `style_guide_version` that are carried as meta data, in particular to version |
30 | | - third-party style guides and ensure the proper functioning of caching. This |
| 22 | + hook](https://github.com/lorenzwalthert/precommit). Because styler caches by |
| 23 | + expression, you will also get speed boosts in large files with many |
| 24 | + expressions when you only change a few of them. See `?caching` for details |
| 25 | + (#538, #578). |
| 26 | + |
| 27 | +* `create_style_guide()` gains two arguments `style_guide_name` and |
| 28 | + `style_guide_version` that are carried as meta data, in particular to version |
| 29 | + third-party style guides and ensure the proper functioning of caching. This |
31 | 30 | change is completely invisible to users who don't create and distribute their |
32 | 31 | own style guide like `tidyverse_style()` (#572). |
33 | 32 |
|
34 | | - |
35 | 33 | ## Minor changes and fixes |
36 | 34 |
|
37 | 35 | * lines are now broken after `+` in `ggplot2` calls for `strict = TRUE` (#569). |
38 | 36 |
|
39 | 37 | * function documentation now contains many more line breaks due to roxygen2 |
40 | 38 | update to version 7.0.1 (#566). |
41 | | - |
| 39 | + |
42 | 40 | * spaces next to the braces in subsetting expressions `[` and `[[` are now |
43 | 41 | removed (#580). |
44 | 42 |
|
| 43 | +* Adapt to changes in the R parser to make styler pass R CMD check again. |
| 44 | + (#583). |
| 45 | + |
45 | 46 | # styler 1.2.0 |
46 | 47 |
|
47 | 48 | ## Breaking changes |
|
51 | 52 | This is also reflected in the invisible return value of the function (#522). |
52 | 53 |
|
53 | 54 | * `style_file()` and friends do not write content back to a file when styling |
54 | | - does not cause any changes in the file. This means the modification date of |
| 55 | + does not cause any changes in the file. This means the modification date of |
55 | 56 | styled files is only changed when the content is changed (#532). |
56 | 57 |
|
57 | 58 | ## New features |
58 | 59 |
|
59 | | -* Aligned function calls are detected and remain unchanged if they match the styler |
60 | | - [definition for aligned function |
| 60 | +* Aligned function calls are detected and remain unchanged if they match the |
| 61 | + styler [definition for aligned function |
61 | 62 | calls](https://styler.r-lib.org/articles/detect-alignment.html) (#537). |
62 | 63 |
|
63 | | -* curly-curly (`{{`) syntactic sugar introduced with rlang 0.4.0 is now |
64 | | - explicitly handled, where previously it was just treated as two consecutive |
| 64 | +* curly-curly (`{{`) syntactic sugar introduced with rlang 0.4.0 is now |
| 65 | + explicitly handled, where previously it was just treated as two consecutive |
65 | 66 | curly braces (#528). |
66 | 67 |
|
67 | 68 | * `style_pkg()`, `style_dir()` and the Addins can now style `.Rprofile`, and |
68 | 69 | hidden files are now also styled (#530). |
69 | 70 |
|
70 | 71 | ## Minor improvements and fixes |
71 | 72 |
|
72 | | -* Brace expressions in function calls are formatted in a less compact way to |
| 73 | +* Brace expressions in function calls are formatted in a less compact way to |
73 | 74 | improve readability. Typical use case: `tryCatch()` (#543). |
74 | 75 |
|
75 | | -* Arguments in function declarations in a context which is indented multiple |
| 76 | +* Arguments in function declarations in a context which is indented multiple |
76 | 77 | times should now be correct. This typically affects `R6::R6Class()` (#546). |
77 | 78 |
|
78 | 79 | * Escape characters in roxygen code examples are now correctly escaped (#512). |
79 | 80 |
|
80 | | -* Special characters such as `\n` in strings are now preserved in text and not |
| 81 | +* Special characters such as `\n` in strings are now preserved in text and not |
81 | 82 | turned into literal values like a line break (#554). |
82 | 83 |
|
83 | 84 | * Style selection Addin now preserves line break when the last line selected is |
|
0 commit comments