blockchain-core icon indicating copy to clipboard operation
blockchain-core copied to clipboard

Automatic Formatting

Open macpie opened this issue 3 years ago • 0 comments

To add a git pre-commit hook format verification you can create a file named pre-commit in your repo @ .git/hooks/pre-commit. With the following content:

#!/usr/bin/env bash

./rebar3 fmt --verbose --check rebar.config && ./rebar3 fmt --verbose --check "config/*.{config,config.src}" && ./rebar3 fmt --verbose --check "{src,include,test}/**/*.{hrl,erl,app.src}" --exclude-files "src/grpc/autogen/**/*" 

Then make it executable

macpie avatar Dec 08 '21 21:12 macpie