GEMINI-Medicine / Rgemini

A custom R package that provides a variety of functions to perform data analyses with GEMINI data
https://gemini-medicine.github.io/Rgemini/
Other
3 stars 0 forks source link

Add pre commit hooks #135

Open vaakesan-SMH opened 1 month ago

vaakesan-SMH commented 1 month ago

There are a few useful pre-commit hooks that should be run automatically on commit. They can be found in this example repository:

https://github.com/lorenzwalthert/precommit/blob/main/.pre-commit-hooks.yaml

I would suggest starting off with styler, and then possibly other checks we think would be useful.

shijiaSMH commented 3 weeks ago

I recommend adding: spelling::spell_check_files() to do spell checks. The pro is this function can automatically produce line-by-line non-English vocabularies. The con is it returns all valid 'non-English' arguments, eg. adm, as a result, it's possible for developer to miss a typo embedded in a long list of 90% valid 'non-English' arguments.

shijiaSMH commented 3 weeks ago

This out-of-box pre-commit-hooks repo look interesting, saving the link here: https://github.com/pre-commit/pre-commit-hooks