foundry-template
foundry-template copied to clipboard
📝 forge fmt and forge snapshot pre-commit hook
Do you rate the hook?
Oh this is dope, can we make it pre-installed so u don't need to run cp?
Unfortunately git hooks must be stored somewhere else and then effectively installed on each local developers' cloned repo. You can't commit the file at .git/hooks/pre-commit.
In JS land it's common to have a postinstall step that runs automatically after npm install which installs your hooks so as a dev you don't even notice it.
I did consider that because Foundry is trying to become a feature complete tool, we could have Foundry install them as part of forge install 👀
What do you think? Maybe worth ccing @gakonst
Down to include by default with easy option to opt out.