Open stephaniereinders opened 1 year ago
The pre-commit
R package mentioned in the above link uses Python in the background to do a bunch of things automatically whenever you do a git commit
:
styler
packagelintr
package (point out potential bugs/inconsistencies)pre-commit
requires a simple yml
configuration file, and it requires python
to be installed on your computer.
I tried it out here: https://github.com/ahgamut/handwriter/commits/rearrange
The advantage of pre-commit
is that it automatically enforces a consistent style and structure on the code in an R package.
One of the disadvantages is that if you introduce pre-commit
after a while, it can add a lot of changes at once, which messes with git blame
and the update history of the code.
Perhaps a pre-commit
can be attempted after other updates to handwriter
.
https://github.com/lorenzwalthert/precommit