rhino
rhino copied to clipboard
Configure pre-commit
I was working on another thing and didn't want to figure out what checks to run, so... I configured pre-commit 😁
Description
This PR adds pre-commit config. pre-commit introduces a series of checks (and fixes) that can be run as git hooks. It is loosely based on a config that I used in shiny.telemetry. I have improved the config to not require globally installed packages.
Note: I have specifically omitted running tests as they can get slow with time and running pre-commit on a pre-commit hook would get annoying.
How to Test
- Follow setup instructions in CONTRIBUTING.md
- Run
pre-commit run --all-filesto see if the checks pass
Proposed Next Steps
- Configure pre-commit.ci
- Remove duplication of checks between pre-commit.ci and GitHub Actions
Definition of Done
- [x] The change is thoroughly documented.
- [x] The CI passes (
R CMD check, linter, unit tests, spelling). - [x] Any generated files have been updated (e.g.
.Rdfiles withroxygen2::roxygenise())
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 20.65%. Comparing base (
7ae011f) to head (65dc2f5).
:exclamation: Current head 65dc2f5 differs from pull request most recent head 5dc7631
Please upload reports for the commit 5dc7631 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## main #593 +/- ##
=======================================
Coverage 20.65% 20.65%
=======================================
Files 9 9
Lines 460 460
=======================================
Hits 95 95
Misses 365 365
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.