File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ if (NOT NRF5_SDK_PATH)
2121 message (FATAL_ERROR "The path to the NRF52 SDK must be specified on the command line (add -DNRF5_SDK_PATH=<path>" )
2222endif ()
2323
24- if (NOT USE_JLINK AND NOT USE_GDB_CLIENT AND NOT USE_OPENOCD)
25- set (USE_JLINK true )
26- endif ()
27-
2824if (USE_JLINK)
2925 if (NOT NRFJPROG)
3026 message (FATAL_ERROR "the path to the tool nrfjprog must be specified on the command line (add -DNRFJPROG=<path>" )
Original file line number Diff line number Diff line change 1+ # Git hooks
2+
3+ This directory contains Git hooks that simplify contributing to this repository.
4+
5+ You can install them by copying the files into ` .git/hooks ` in the repository folder or by running ` git config --local core.hooksPath hooks `
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if clang-format --version | grep -q ' version 11\.' ; then
3+ CLANG_FORMAT_EXECUTABLE=" clang-format"
4+ else
5+ CLANG_FORMAT_EXECUTABLE=" clang-format-11"
6+ fi
7+
8+ if ! command -v $CLANG_FORMAT_EXECUTABLE & > /dev/null
9+ then
10+ echo $CLANG_FORMAT_EXECUTABLE does not exist, make sure to install it
11+ exit 1
12+ fi
13+
14+ for FILE in $( git diff --cached --name-only)
15+ do
16+ if [[ " $FILE " =~ src/[A-Za-z0-9\ \- ]+* \. (c| h| cpp| cc)$ ]]; then
17+ echo Autoformatting $FILE with $CLANG_FORMAT_EXECUTABLE
18+ $CLANG_FORMAT_EXECUTABLE -style=file -i -- $FILE
19+ git add -- $FILE
20+ elif [[ " $FILE " =~ src/(components| displayapp| drivers| heartratetask| logging| systemtask)/.* \. (c| h| cpp| cc)$ ]]; then
21+ echo Autoformatting $FILE with $CLANG_FORMAT_EXECUTABLE
22+ $CLANG_FORMAT_EXECUTABLE -style=file -i -- $FILE
23+ git add -- $FILE
24+ fi
25+ done
Original file line number Diff line number Diff line change @@ -70,5 +70,5 @@ bool FlashLight::Refresh() {
7070}
7171
7272bool FlashLight::OnTouchEvent (Pinetime::Applications::TouchEvents event) {
73- return true ;
73+ return false ;
7474}
You can’t perform that action at this time.
0 commit comments