gitlabr
gitlabr copied to clipboard
feat: Add pre-commit hooks
Hi!
I've added some basic pre-commit hooks. We are using these on all of our R projects and find that they contribute significantly to code quality. I only added some basic hooks and then applied them to the project. I know that a lot of files were changed but you should find that all of the changes were cosmetic.
Best regards, Andrew.
I appreciate that 46 changed files is a lot. If you find this too much to review (would not surprise me!) then I'd be happy to prune down the set of hooks applied for this.
Thank you @datawookie for your proposition and I may take some of it in my private projects too.
I need to think if I need Rds, RData, ... on git or not. Sometimes there are needed for examples.
I'll take some time to think about all of it, but I like that the package can be cleaned before pushed.
For now, I am quite busy on other projects.
Although I understand the benefit of automating this task, I am now using VSCode with the format on save, which solves this issue.
I know that it won't prevent contributors to not style their code, but for now, I'll accept it :smiley:
I styled the complete package in this PR: https://github.com/ThinkR-open/gitlabr/pull/116