Appsilon / rhino

Build high quality, enterprise-grade Shiny apps at speed
https://appsilon.github.io/rhino
287 stars 24 forks source link

Configure pre-commit #593

Open TymekDev opened 3 months ago

TymekDev commented 3 months ago

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

  1. Follow setup instructions in CONTRIBUTING.md
  2. Run pre-commit run --all-files to see if the checks pass

Proposed Next Steps

  1. Configure pre-commit.ci
  2. Remove duplication of checks between pre-commit.ci and GitHub Actions

Definition of Done

codecov-commenter commented 3 months ago

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 ```diff @@ 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.