gitlabr icon indicating copy to clipboard operation
gitlabr copied to clipboard

feat: Add pre-commit hooks

Open datawookie opened this issue 3 years ago • 2 comments

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.

datawookie avatar Oct 29 '22 16:10 datawookie

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.

datawookie avatar Oct 29 '22 16:10 datawookie

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.

statnmap avatar Nov 08 '22 22:11 statnmap

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

statnmap avatar May 15 '24 09:05 statnmap