Skip to content

Commit b90cd09

Browse files
committed
Merge branch 'r-0.0-8' into production
2 parents c033b7d + fd108b9 commit b90cd09

File tree

197 files changed

+6182
-1620
lines changed

Some content is hidden

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

197 files changed

+6182
-1620
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
^appveyor\.yml$
88
^tic\.R$
99
^\.travis\.yml$
10+
^docs$

API

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
## Exported functions
44

5-
get_transformers(flat = FALSE, ...)
6-
get_transformers_flat(strict = TRUE, start_comments_with_one_space = FALSE)
7-
get_transformers_nested(scope = "tokens", strict = TRUE, indent_by = 2, start_comments_with_one_space = FALSE)
8-
style_dir(path = ".", flat = FALSE, recursive = TRUE, transformers = get_transformers(flat = flat))
9-
style_file(path, flat = FALSE, transformers = get_transformers(flat = flat))
10-
style_pkg(pkg = ".", flat = FALSE, transformers = get_transformers(flat = flat))
11-
style_text(text, flat = FALSE, transformers = get_transformers(flat = flat))
5+
create_style_guide(filler = create_filler, line_break = NULL, space = NULL, token = NULL, indention = NULL, use_raw_indention = FALSE)
6+
style_dir(path = ".", ..., style = tidyverse_style, transformers = style(...), recursive = TRUE)
7+
style_file(path, ..., style = tidyverse_style, transformers = style(...))
8+
style_pkg(pkg = ".", ..., style = tidyverse_style, transformers = style(...))
9+
style_text(text, ..., style = tidyverse_style, transformers = style(...))
10+
tidyverse_style(scope = "tokens", strict = TRUE, indent_by = 2, start_comments_with_one_space = FALSE)

DESCRIPTION

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Package: styler
22
Title: Non-invasive Pretty Printing of R code
3-
Version: 0.0-7
4-
Authors@R: person("Kirill", "Müller", role = c("aut", "cre"), email = "[email protected]")
3+
Version: 0.0-8
4+
Authors@R: c(person("Kirill", "Müller", role = c("aut"), email = "[email protected]"),
5+
person("Lorenz", "Walthert", role = c("cre", "aut"), email = "[email protected]"))
56
Description:
67
Pretty-prints R code without changing the user's formatting intent.
78
Imports:
89
dplyr,
9-
magrittr,
1010
purrr,
11-
readr,
11+
rlang,
1212
rprojroot,
1313
tibble,
1414
tidyr,
@@ -28,25 +28,27 @@ Remotes:
2828
License: GPL-3
2929
Encoding: UTF-8
3030
LazyData: true
31-
Date: 2017-07-27
31+
Date: 2017-08-24
3232
BugReports: https://github.com/krlmlr/styler/issues
3333
URL: https://github.com/krlmlr/styler, http://krlmlr.github.io/styler
34-
Roxygen: list(markdown = TRUE, roclets = c("rd", "namespace", "pkgapi::api_roclet"))
34+
Roxygen: list(markdown = TRUE, roclets = c("rd", "namespace", "collate", "pkgapi::api_roclet"))
3535
RoxygenNote: 6.0.1.9000
3636
VignetteBuilder: knitr
3737
Collate:
38-
'get_transformers.R'
3938
'modify_pd.R'
4039
'nested.R'
4140
'nested_to_tree.R'
4241
'parsed.R'
42+
'reindent.R'
43+
'token.R'
4344
'relevel.R'
4445
'rules-line_break.R'
4546
'rules-other.R'
4647
'rules-replacement.R'
4748
'rules-spacing.R'
4849
'serialize.R'
4950
'serialized_tests.R'
51+
'style_guides.R'
5052
'styler.R'
5153
'transform.R'
5254
'unindent.R'

NAMESPACE

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
export(get_transformers)
4-
export(get_transformers_flat)
5-
export(get_transformers_nested)
3+
export(create_style_guide)
64
export(style_dir)
75
export(style_file)
86
export(style_pkg)
97
export(style_text)
8+
export(tidyverse_style)
109
import(dplyr)
1110
import(tibble)
1211
import(tidyr)
@@ -21,4 +20,6 @@ importFrom(purrr,pmap)
2120
importFrom(purrr,pwalk)
2221
importFrom(purrr,reduce)
2322
importFrom(purrr,when)
23+
importFrom(rlang,seq2)
24+
importFrom(utils,tail)
2425
importFrom(utils,write.table)

NEWS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
## styler 0.0-8 (2017-08-24)
2+
3+
- Vignette on customizing styler (#145).
4+
- No line break after `switch()` and friends (#152).
5+
- Remove flat relicts completely (#151).
6+
- Don't reindent function calls and break line correctly for multi-line calls (#149).
7+
- Set space between "=" and "," (#150).
8+
- Make R CMD Check perfect (#148).
9+
- Adding tests for exception handling with invalid parse data (#139).
10+
- Fix indention by checking for all potential triggers (#142).
11+
- Fix un-indention (#135).
12+
- Support wide characters (#130).
13+
- No spaces around :, :: and :::.
14+
- Redesigning the API (#123).
15+
- Solve eq_sub indention in general (#125).
16+
- Minor refactorings.
17+
- Re-indent token-dependent (#119).
18+
- Supporting more indention patterns.
19+
- Allow raw indention.
20+
- Definitively fixing eol issue with comments.
21+
- Infrastructure.
22+
- Flattening out the parse table.
23+
- New rule: no space after ! -> !!! for tidyeval.
24+
- Fix spacing around '{'.
25+
- Don't drop tokens! Fixes #101.
26+
- EOL spaces in empty comments (and in general) (#98).
27+
- mal-indention in conditional statement due to wrong specification of indent_without_paren) (#95).
28+
- Complicated indentions based on arithmetic and special operators (#96).
29+
- indention interaction on with assignment operator and other operators (#97).
30+
131
## styler 0.0-7 (2017-07-27)
232

333
- curly braces don't move a line up if previous token is comment.

R/get_transformers.R

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)