Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure pre-commit #593

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Configure pre-commit #593

wants to merge 4 commits into from

Conversation

TymekDev
Copy link
Contributor

@TymekDev TymekDev commented Jun 17, 2024

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

  • The change is thoroughly documented.
  • The CI passes (R CMD check, linter, unit tests, spelling).
  • Any generated files have been updated (e.g. .Rd files with roxygen2::roxygenise())

TymekDev added 2 commits June 17, 2024 10:29
The aim is to make them more useful to potential contributors and make
them read simpler.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 20.65%. Comparing base (7ae011f) to head (65dc2f5).

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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TymekDev TymekDev force-pushed the pre-commit branch 2 times, most recently from bf20a02 to 95e9ea2 Compare June 17, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants