Skip to content

Commit 3ef57c2

Browse files
Merge 816a718 into 9305b62
2 parents 9305b62 + 816a718 commit 3ef57c2

File tree

69 files changed

+608
-152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+608
-152
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tests/testthat/**/*_tree linguist-generated=true
1+
tests/testthat/**/*_tree linguist-generated=true

.github/workflows/R-CMD-check.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ jobs:
2727
matrix:
2828
config:
2929
- {os: macOS-latest, r: 'release'}
30+
- {os: windows-latest, r: 'devel'}
3031
- {os: windows-latest, r: 'release'}
31-
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
32-
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
32+
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
33+
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
3334
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3435
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3536
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}

.github/workflows/check-full.yaml

Whitespace-only changes.

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: master
3+
branches: main
44

55
name: pkgdown
66

.github/workflows/test-coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
on:
22
push:
33
branches:
4-
- master
4+
- main
55
pull_request:
66
branches:
7-
- master
7+
- main
88

99
name: test-coverage
1010

.pre-commit-config.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ default_stages: [commit]
44

55
repos:
66
- repo: https://github.com/lorenzwalthert/precommit
7-
rev: v0.1.3.9014
7+
rev: v0.1.3.9139
88
hooks:
99
- id: style-files
1010
args: [--style_pkg=styler, --style_fun=tidyverse_style]
1111
exclude: >
1212
(?x)^(
13-
tests/testthat/.*/.*\.R(md)?|
13+
tests/testthat/.*/.*\.R(md|nw)?|
1414
vignettes/customizing_styler\.Rmd|
1515
tests/testthat/public-api/xyzfile-rnw/random4\.Rnw|
16+
vignettes/detect-alignment\.Rmd|
17+
tests/testmanual/addins/.*invalid.*|
18+
tests/testmanual/addins/r-valid\.R|
1619
)$
1720
- id: roxygenize
21+
additional_dependencies:
22+
- r-lib/pkgapi
1823
- id: use-tidy-description
1924
- id: spell-check
2025
exclude: >
@@ -49,7 +54,8 @@ repos:
4954
tests/testthat/public-api/xyzaddin/addin_region-.*|
5055
tests/testmanual/addins/r-invalid\.R|
5156
tests/testthat/escaping/basic-escape-out\.R|
52-
tests/testthat/indention_operators/base_pipe_and_assignment-.*|
57+
tests/testthat/indention_operators/.*pipe.*|
58+
tests/testthat/line_breaks_and_other/.*pipe.*|
5359
tests/testthat/exception_handling/parser-error.R|
5460
)$
5561
- id: no-browser-statement
@@ -58,14 +64,15 @@ repos:
5864
tests/testthat/public-api/xyzaddin/addin_region-.*|
5965
tests/testmanual/addins/r-invalid\.R|
6066
tests/testthat/escaping/basic-escape-out\.R|
61-
tests/testthat/indention_operators/base_pipe_and_assignment-.*|
67+
tests/testthat/indention_operators/.*pipe.*|
68+
tests/testthat/line_breaks_and_other/.*pipe.*|
6269
tests/testthat/exception_handling/parser-error.R|
6370
)$
6471
- id: deps-in-desc
6572
exclude: >
6673
(?x)^(
6774
touchstone/.*|
68-
tests/testmanual/addins/r-invalid\.R|
75+
tests/testmanual/addins/.*invalid.*|
6976
tests/testthat/escaping/basic-escape-out\.R|
7077
tests/testthat/rnw/011-conditional-eval-out\.Rnw|
7178
tests/testthat/.*\.R(md)?
@@ -76,7 +83,13 @@ repos:
7683
- id: check-added-large-files
7784
args: ['--maxkb=200']
7885
- id: end-of-file-fixer
79-
exclude: '\.Rd'
86+
exclude: >
87+
(?x)^(
88+
\.Rd|
89+
tests/testthat/exception_handling/empty_file\.R|
90+
tests/testthat/parse_comments/eol_eof_spaces-.*|
91+
tests/testthat/reference-objects/.*|
92+
)$
8093
- repo: local
8194
hooks:
8295
- id: forbid-to-commit

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: styler
33
Title: Non-Invasive Pretty Printing of R Code
4-
Version: 1.6.2
4+
Version: 1.6.2.9000
55
Authors@R:
66
c(person(given = "Kirill",
77
family = "Müller",
@@ -16,8 +16,9 @@ Description: Pretty-prints R code without changing the user's formatting
1616
License: MIT + file LICENSE
1717
URL: https://github.com/r-lib/styler, https://styler.r-lib.org
1818
BugReports: https://github.com/r-lib/styler/issues
19+
Depends:
20+
R (>= 3.4.0)
1921
Imports:
20-
backports (>= 1.1.0),
2122
cli (>= 1.1.0),
2223
glue,
2324
magrittr (>= 2.0.0),
@@ -29,7 +30,6 @@ Imports:
2930
tibble (>= 1.4.2),
3031
tools,
3132
withr (>= 1.0.0),
32-
xfun (>= 0.1)
3333
Suggests:
3434
data.tree (>= 0.1.6),
3535
digest,
@@ -46,7 +46,7 @@ VignetteBuilder:
4646
Encoding: UTF-8
4747
Roxygen: list(markdown = TRUE, roclets = c("rd", "namespace", "collate",
4848
"pkgapi::api_roclet"))
49-
RoxygenNote: 7.1.1.9001
49+
RoxygenNote: 7.1.2
5050
Collate:
5151
'addins.R'
5252
'communicate.R'

NEWS.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
# styler 1.2
1+
# styler 1.6.2.9000 (Development version)
2+
3+
* Alignment detection respects stylerignore (#850).
4+
* Add vignette on distributing style guide (#846, #861).
5+
* Enable pre-commit.ci (#843).
6+
* new R option `styler.cache_root` (defaulting to `"styler"`) that determines
7+
the sub-directory under the {R.cache} cache directory that {styler} uses. Non-
8+
default caches won't be cleaned up by {styler}. We suggest `"styler-perm"`
9+
(also used by {precommit}).
10+
* rename default branch to main (#859).
11+
* Fix argument name `filetype` in Example for `style_dir()` (#855).
12+
* ensure a trailing blank line also if the input is cached (#867).
13+
* Bump minimal R requirement to 3.4 in line with the [tidyverse](https://www.tidyverse.org/blog/2019/04/r-version-support/), which
14+
allowed to remove the dependency at {backports} and some exception handling.
15+
* Remove dependency on {xfun} (#866).
16+
* use bootstrap 5 with {pkgdown} 2.0
17+
18+
# styler 1.6.2
219

320
* clean up cache files older than one week (#842).
421

R/addins.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#' Helper functions for styling via RStudio Addins.
44
#' @section Addins:
55
#' - Set style: Select the style transformers to use. For flexibility, the user
6-
#' input is passed to the `transformers` argument, not the `style` argument, so
7-
#' entering `styler::tidyverse_style(scope = "spaces")` in the Addin is
6+
#' input is passed to the `transformers` argument, not the `style` argument,
7+
#' so entering `styler::tidyverse_style(scope = "spaces")` in the Addin is
88
#' equivalent to `styler::style_text("1+1", scope = "spaces")` and
99
#' `styler::style_text("1+1", transformers = styler::tidyverse_style(scope = "spaces"))`
1010
#' if the text to style is `1+1`. The style transformers are memorized

R/communicate.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @inheritParams can_verify_roundtrip
88
#' @keywords internal
99
communicate_warning <- function(changed, transformers) {
10-
if (any(changed, na.rm = TRUE) &&
10+
if (any(changed, na.rm = TRUE) &&
1111
!can_verify_roundtrip(transformers) &&
1212
!getOption("styler.quiet", FALSE)
1313
) {

0 commit comments

Comments
 (0)