Skip to content

{precommit} v0.3.0 (2022-05-20)

Compare
Choose a tag to compare
@lorenzwalthert lorenzwalthert released this 20 May 11:33
· 523 commits to main since this release

API changes

  • The style-files hook now takes ignore-start and ignore-stop arguments, passed to options("styler.ignore_start") and options("styler.ignore_stop"). By default, {styler} defaults are used.
  • use_precommit() now exposes the argument autoupdate, defaulting to TRUE (which was the previous behavior). This tells {precommit} whether or not to run autoupdate() as part of the former function invocation (#386).

New features

  • New hook no-debug-statement checks for leftover debug() and debugonce() statements in the committed code (#385,
    @lukasfeick-sw).
  • The template .pre-commit-config.yaml does now include the hook file-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 with snippet_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 and parsable-R can now handle code chunk headers with where purl or eval are not literals like TRUE, 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.