Skip to content

Commit

Permalink
add new integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Feb 18, 2022
1 parent e435f57 commit 16e5381
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

**Other changes**

* {styler} can be ran via GitHub Actions using
`usethis::use_github_action("style")` (#914).

* `.onLoad()` method no longer broken with {cli} >= 3.1 (#893).
* Piped function without brackets `substitute(x %>% y)` don't get `()` added
anymore for one level deep (not more yet, see #889), as this can change
Expand Down
9 changes: 7 additions & 2 deletions vignettes/third-party-integrations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ knitr::opts_chunk$set(
styler functionality is available in other tools, most notably

* as a pre-commit hook `style-files` in
<https://github.com/lorenzwalthert/precommit>
<https://github.com/lorenzwalthert/precommit> to format before commit
(locally) and enforced as a continuous integration step in the cloud through
<https://pre-commit.ci>.

* via `usethis::use_tidy_style()` styles your project according to the tidyverse
style guide.
Expand All @@ -28,7 +30,10 @@ styler functionality is available in other tools, most notably
is used. The most convenient way to set this up is via
[`usethis::use_tidy_github_actions()`](https://usethis.r-lib.org/reference/tidyverse.html).

* as a formatter for RMarkdown without modifying the source. This feature is
* through the [GitHub Action Workflow](https://github.com/r-lib/actions/tree/v2-branch/examples#style-package) that triggers `styler::style_pkg()`
on changes in source files.

* as a formatter for R Markdown without modifying the source. This feature is
implemented as a code chunk option in knitr. use `tidy = "styler"` in the
header of a code chunks (e.g.` ```{r name-of-the-chunk, tidy = "styler"} `),
or `knitr::opts_chunk$set(tidy = "styler")` at the top of your RMarkdown
Expand Down

0 comments on commit 16e5381

Please sign in to comment.