diff --git a/DESCRIPTION b/DESCRIPTION index c3b1ba065..0722e1df7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: styler Title: Non-Invasive Pretty Printing of R Code -Version: 1.6.2.9000 +Version: 1.7.0 Authors@R: c(person(given = "Kirill", family = "Müller", @@ -19,7 +19,7 @@ BugReports: https://github.com/r-lib/styler/issues Depends: R (>= 3.4.0) Imports: - cli (>= 1.1.0), + cli (>= 3.1.1), magrittr (>= 2.0.0), purrr (>= 0.2.3), R.cache (>= 0.15.0), diff --git a/NEWS.md b/NEWS.md index a5f17ed06..25003e04b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# styler 1.6.2.9000 (Development version) +# styler 1.7.0 **API changes** @@ -47,10 +47,10 @@ there are comments and line breaks under certain circumstances (#905). * rules that add tokens don't break stylerignore sequences anymore (#891). * Alignment detection respects stylerignore (#850). -* `~` causes now indention, like `+`, `-`, `|` etc. (#902). -* `Warning: Unknown or uninitialised column:` was fixed (#885). * Unaligned expressions with quoted key (e.g. `c("x" = 2)`) are now correctly detected (#881). +* `~` causes now indention, like `+`, `-`, `|` etc. (#902). +* `Warning: Unknown or uninitialised column:` was fixed (#885). * function calls with unequal number of token on different lines are no longer deemed aligned if there are arbitrary spaces around the tokens on the lines with most tokens (#902). @@ -86,6 +86,10 @@ * {styler} test are relaxed to not assume a specific error message on the wrong usage of `_` (#929). +Thanks to all contributors that made this release possible: + +[@bersbersbers](https://github.com/bersbersbers), [@daniel-wrench](https://github.com/daniel-wrench), [@dbykova](https://github.com/dbykova), [@EngrStudent](https://github.com/EngrStudent), [@hadley](https://github.com/hadley), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@jam1015](https://github.com/jam1015), [@jooyoungseo](https://github.com/jooyoungseo), [@kalaschnik](https://github.com/kalaschnik), [@kaytif](https://github.com/kaytif), [@kpagacz](https://github.com/kpagacz), [@krlmlr](https://github.com/krlmlr), [@lionel-](https://github.com/lionel-), [@lorenzwalthert](https://github.com/lorenzwalthert), [@maelle](https://github.com/maelle), [@MichaelChirico](https://github.com/MichaelChirico), [@mine-cetinkaya-rundel](https://github.com/mine-cetinkaya-rundel), [@neuwirthe](https://github.com/neuwirthe), [@Polkas](https://github.com/Polkas), [@pwang2](https://github.com/pwang2), [@sebffischer](https://github.com/sebffischer), [@ShixiangWang](https://github.com/ShixiangWang), [@ssh352](https://github.com/ssh352), and [@xjtusjtu](https://github.com/xjtusjtu). + # styler 1.6.2 * clean up cache files older than one week (#842). @@ -589,7 +593,7 @@ Thanks to all contributors involved, in particular [@tvatter](https://github.com/tvatter), [@wdearden](https://github.com/wdearden), [@wmayner](https://github.com/wmayner), and -[@yech1990](https://github.com/yech1990). +@yech1990. # styler 1.1.0 diff --git a/R/zzz.R b/R/zzz.R index d0a172c44..9666a62c0 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -20,7 +20,7 @@ ask_to_switch_to_non_default_cache_root <- function(ask = interactive()) { - if (ask && runif(1) > 0.9 && is.null(getOption("styler.cache_root"))) { + if (ask && stats::runif(1) > 0.9 && is.null(getOption("styler.cache_root"))) { ask_to_switch_to_non_default_cache_root_impl() options(styler.cache_root = "styler") } diff --git a/README.Rmd b/README.Rmd index 7f25cb253..38dfa4718 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,7 +19,7 @@ knitr::opts_chunk$set( [![R build status](https://github.com/r-lib/styler/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/styler/actions) [![Life cycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![codecov test coverage](https://codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://codecov.io/gh/r-lib/styler) +[![codecov test coverage](https://app.codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/styler) [![CRAN Status](https://www.r-pkg.org/badges/version/styler)](https://cran.r-project.org/package=styler) diff --git a/README.md b/README.md index 4ad42762a..40066a028 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ status](https://github.com/r-lib/styler/workflows/R-CMD-check/badge.svg)](https: [![Life cycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![codecov test -coverage](https://codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://codecov.io/gh/r-lib/styler) +coverage](https://app.codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/styler) [![CRAN Status](https://www.r-pkg.org/badges/version/styler)](https://cran.r-project.org/package=styler) diff --git a/cran-comments.md b/cran-comments.md index 63c531556..517ff98bb 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,13 +1,11 @@ -This is a re-submission to fix a problem with persistent caching. Note that -all cached files are of size 0 and this is by design to keep the cache small. -Hence, the cache will still have files of size 0, but we remove all files older -than a week and remove all caches for versions of styler other than the one -running as requested. +This release does not check for a specific error message from `parse()` anymore +when the input involves unparsable use of `_`. The release was requested by Luke +Tierney. ## Test environments -* local OS X install (10.15.7): R 4.1.0 -* ubuntu 18.04 (on GitHub Actions): R devel, R 4.1.1, R 4.0.5, R 3.6, R 3.5, R 3.4 + +* ubuntu 18.04 (on GitHub Actions): R devel, R 4.1.2, R 4.0.5, R 3.6, R 3.5, R 3.4 * Windows Server 10 (on GitHub Actions): R 3.6, R 4.0.5 * win-builder: R devel @@ -39,15 +37,13 @@ downstream dependencies are: * Reverse imports: biocthis, boomer, exampletestr, flow, iNZightTools, languageserver, questionr, shinymeta, shinyobjects, ShinyQuickStarter, - systemPipeShiny, tidypaleo + systemPipeShiny, tidypaleo. + -* Reverse suggests: autothresholdr, autothresholdr, crunch, datastructures, - drake, epigraphdb, knitr, multiverse, nph, precommit, reprex, shiny.react, - shinydashboardPlus, shinyMonacoEditor, usethis. - +* Reverse suggests: admiral, autothresholdr, crunch, datastructures, drake, + epigraphdb, ghclass, knitr, multiverse, nph, precommit, reprex, shiny.react, + shinydashboardPlus, shinyMonacoEditor, upsetjs, usethis. -All of them finished R CMD CHECK with the same number of ERRORS, WARNINGS and -NOTES as with the current CRAN version of styler, which means the new -submission of styler does not introduce any ERRORS, WARNINGS and NOTES in -downstream dependencies. +All of them finished R CMD CHECK with zero (0) ERRORS, WARNINGS and +NOTES. diff --git a/inst/WORDLIST b/inst/WORDLIST index c994cb6bd..cd36eebc9 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -70,6 +70,7 @@ getChecksum getOption getRversion ggplot +ghclass github gitsum grkstyle @@ -236,6 +237,7 @@ tidypaleo tidyr tidyverse Tidyverse +Tierney tokenized travis tryCatch @@ -250,7 +252,9 @@ unindention unlink unlinkunindention unnest +unparsable unstyled +upsetjs usethis utf Uwe diff --git a/vignettes/remove_rules.Rmd b/vignettes/remove_rules.Rmd index 964f6d127..63cca20e3 100644 --- a/vignettes/remove_rules.Rmd +++ b/vignettes/remove_rules.Rmd @@ -22,7 +22,7 @@ If you want to change the behavior of styler to match your desired style, there are multiple ways: - Use the tidyverse style guide, but not with the default options. Starting - point for this approach is the [help file](http://styler.r-lib.org/reference/tidyverse_style.html) for + point for this approach is the [help file](https://styler.r-lib.org/reference/tidyverse_style.html) for the function `tidyverse_style()`, which returns the transformer functions that prettify your code. Most of these options are explained in `vignette("styler")`. @@ -77,7 +77,7 @@ names(transformers) ``` From the aforementioned -[vignette](http://styler.r-lib.org/articles/customizing_styler.html): +[vignette](https://styler.r-lib.org/articles/customizing_styler.html): > We note that there are different types of transformer functions. initialize initializes some variables in the nested parse table (so it is not actually a @@ -187,7 +187,7 @@ is code that will have the first empty line in the function body removed by styl `transformers$space$start_comments_with_space` I think you get the idea. I nevertheless recommend using the [tidyverse style -guide](http://style.tidyverse.org/) as is since +guide](https://style.tidyverse.org/) as is since - it is a well-established, thought-through style.