restake
restake copied to clipboard
Use precommit for formatting
Apply pre-commit (https://pre-commit.com/) for code formatting
Thanks for this! I like the idea but will need to apply this at the right time to avoid conflicts. I also need to research if PreCommit is the right solution.
Do you think this should be applied automatically as part of a PR process?
Thanks for this! I like the idea but will need to apply this at the right time to avoid conflicts. I also need to research if PreCommit is the right solution.
Do you think this should be applied automatically as part of a PR process?
Hi, Some projects do apply it as a 2nd commit to the PR but this can cause issues with people not pulling changes in the branch before adding new ones.
Ideally, it is done at the commit level (so contributors should run it via their git commit (pre-commit install
adds the hook)). This can also ensure that commits have proper messaging to allow autoreleasing via semver, etc.
At some projects it is just done from time to time to adjust the formatting, etc as the different plugins enabled can be tailored via the .precommit configuration file (for example for catching spelling typos, etc)
@merakrun thanks so much for this, I'm going to split REStake UI into a separate repo so will revisit this soon