File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # Copyright (c) 2018 The Bitcoin Core developers
4
+ # Distributed under the MIT software license, see the accompanying
5
+ # file COPYING or http://www.opensource.org/licenses/mit-license.php.
6
+ #
7
+ # Check that all logs are terminated with '\n'
8
+ #
9
+ # Some logs are continued over multiple lines. They should be explicitly
10
+ # commented with \* Continued *\
11
+ #
12
+ # There are some instances of LogPrintf() in comments. Those can be
13
+ # ignored
14
+
15
+
16
+ UNTERMINATED_LOGS=$( git grep " LogPrintf(" -- " *.cpp" | \
17
+ grep -v ' \\n"' | \
18
+ grep -v " /\* Continued \*/" | \
19
+ grep -v " LogPrintf()" )
20
+ if [[ ${UNTERMINATED_LOGS} != " " ]]; then
21
+ echo " All calls to LogPrintf() should be terminated with \\ n"
22
+ echo
23
+ echo " ${UNTERMINATED_LOGS} "
24
+ exit 1
25
+ fi
You can’t perform that action at this time.
0 commit comments