File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# See https://pre-commit.com for more information
22# See https://pre-commit.com/hooks.html for more hooks
33repos :
4- - repo : https://github.com/franzpoeschel/openPMD-api-pre-commit-hooks
5- rev : aa38b2ad4fae42db05c19de211f43df6a7981bc5
4+ - repo : local
65 hooks :
76 - id : clang-format
7+ name : clang-format
8+ description : Clang-format our code base
9+ language : conda
10+ entry : bash ./clang-format.sh --install-clang-format
11+ additional_dependencies : [clang-format-12]
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ if [[ $1 = " --install-clang-format" ]]; then
4+ echo -e " \n\n\n–––––––\nENV:\n––––––––\n\n\n$( env) \n\n\n–––––\nBINS:\n–––––\n\n\n$( ls $CONDA_PREFIX /..) \n\n\n"
5+ ls /usr/bin
6+ fi
7+
8+ find include/ src/ test/ examples/ \
9+ -regextype egrep \
10+ -type f -regex ' .*\.(hpp|cpp|hpp\.in)$' \
11+ | xargs /usr/bin/clang-format-12 -i
Original file line number Diff line number Diff line change 1+ # I am a conda environment, used for our pre-commit hooks
2+ name : openPMD-api-dev
3+ channels :
4+ - conda-forge
5+ dependencies :
6+ - clang-format-12=12.0.1
7+ - bash=5
You can’t perform that action at this time.
0 commit comments