Skip to content

Commit 69ef60a

Browse files
kouamoeba
andauthored
Keep direct lintr usage
Co-authored-by: Bryce Mecum <[email protected]>
1 parent 2e68fad commit 69ef60a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

r/vignettes/developers/workflow.Rmd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pkgdown::build_site(preview=TRUE)
5151

5252
## Styling and linting
5353

54-
You can automatically adjust our styling and lint by [pre-commit](https://pre-commit.com/):
54+
Styling and linting can be set up and performed entirely with the [pre-commit](https://pre-commit.com/) tool:
5555

5656
```bash
5757
pre-commit run --show-diff-on-failure --color=always --all-files r
@@ -67,6 +67,15 @@ You can automatically change the formatting of the code in the package using the
6767

6868
The styler package will fix many styling errors, thought not all lintr errors are automatically fixable with styler. The list of files we intentionally do not style is in `r/.styler_excludes.R`.
6969

70+
Linting and styling with [pre-commit](https://pre-commit.com/) as described above is the best way to ensure your changes are being checked properly but you can also run the tools individually if you prefer:
71+
72+
```r
73+
lintr::lint_package() # for linting
74+
styler::style_pkg() # for styling
75+
```
76+
77+
Note: To run lintr, we require the `cyclocomp` package to be installed first.
78+
7079
### C++ code
7180

7281
The arrow package uses some customized tools on top of [cpp11](https://cpp11.r-lib.org/) to prepare its

0 commit comments

Comments
 (0)