{precommit} v0.3.0 (2022-05-20)
API changes
- The
style-fileshook now takesignore-startandignore-stoparguments, 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-statementchecks for leftoverdebug()anddebugonce()statements in the committed code (#385,
@lukasfeick-sw). - The template
.pre-commit-config.yamldoes now include the hookfile-contents-sorterto sort.Rbuildignore(#366). - The template
.pre-commit-config.yamldefault 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
Ras a dependency withsnippet_generate("additional-deps-roxygenize")(#358). roxygenizehook now fails if it generates an.Rdfile that is not tracked with version control (#363).- Improved compatibility with {renv} (#359, #375, #400).
deps-in-descandparsable-Rcan now handle code chunk headers with wherepurlorevalare not literals likeTRUE, but
variables defined elsewhere in code (#361, #382).deps-in-descnow prints the original file (not a tempfile) also for.Rmdand.Rnwfiles.
Thanks to all people who contributed to this release:
@assignUser, @danhalligan, @gravesti, @hadley, @KyleDCox, @lorenzwalthert, @lukasfeick-sw, @MarkMc1089, @pat-s, @RoyalTS, and @smingerson.