You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Erik Nyquist edited this page Jun 29, 2016
·
5 revisions
1. Install clang-format
The best way to do this is to ask your package manager which versions of clang-format. are available.
Debian/Ubuntu
From a terminal, enter the following:
apt-get update
apt-cache search clang-format
This will present you with a list of available versions. Pick one, and run
apt-get install clang-format-xxx
replacing clang-format-xxx with the full name of the version you picked.
Fedora
From a terminal, enter the following:
yum search clang-format
This will present you with a list of available versions. Pick one, and run
yum install clang-format-xxx
replacing clang-format-xxx with the full name of the version you picked.
2. Add pre-commit hook
download our pre-commit script from here, and save it to the root directory of the repository clone to which you wish to apply the hook. Then, navigate to the repository's root directory and rename the downloaded file to .git/hooks/pre-commit.
Alternatively, do it entirely from a terminal:
cd corelibs-arduino101-fork
curl https://gist.githubusercontent.com/eriknyquist/d8d3c14406a76bd7d9516a3aaaa3423e/raw > .git/hooks/pre-commit