{precommit} v0.3.0 (2022-05-20)
API changes
- The
style-files
hook now takesignore-start
andignore-stop
arguments, passed tooptions("styler.ignore_start")
andoptions("styler.ignore_stop")
. By default, {styler} defaults are used. use_precommit()
now exposes the argumentautoupdate
, defaulting toTRUE
(which was the previous behavior). This tells {precommit} whether or not to runautoupdate()
as part of the former function invocation (#386).
New features
- New hook
no-debug-statement
checks for leftoverdebug()
anddebugonce()
statements in the committed code (#385,
@lukasfeick-sw). - The template
.pre-commit-config.yaml
does now include the hookfile-contents-sorter
to sort.Rbuildignore
(#366). - The template
.pre-commit-config.yaml
default to monthly hook updates (instead of weekly) to avoid notification triggers and git
version convolution (#370). - The codemeta hook was ported to
language: r
(#350).
Documentation
- Refactor README into new README and a Get started vignette (#388).
- Document advantages of pre-commit in vignette (#379).
Bug fixes
- Don't include
R
as a dependency withsnippet_generate("additional-deps-roxygenize")
(#358). roxygenize
hook now fails if it generates an.Rd
file that is not tracked with version control (#363).- Improved compatibility with {renv} (#359, #375, #400).
deps-in-desc
andparsable-R
can now handle code chunk headers with wherepurl
oreval
are not literals likeTRUE
, but
variables defined elsewhere in code (#361, #382).deps-in-desc
now prints the original file (not a tempfile) also for.Rmd
and.Rnw
files.
Thanks to all people who contributed to this release:
@assignUser, @danhalligan, @gravesti, @hadley, @KyleDCox, @lorenzwalthert, @lukasfeick-sw, @MarkMc1089, @pat-s, @RoyalTS, and @smingerson.