Don't we have a linter that should catch these?
Add missing newlines to debug logging #13153
pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2018_05_log_newlines changing 6 files +11 −10-
laanwj commented at 12:52 PM on May 2, 2018: member
- laanwj added the label P2P on May 2, 2018
- laanwj requested review from jnewbery on May 2, 2018
-
jonasschnelli commented at 12:54 PM on May 2, 2018: contributor
utACK 4987c2495f2910434645abe7f4fe424101cb36e3
-
MarcoFalke commented at 1:00 PM on May 2, 2018: member
Suggested fix for the linter:
diff --git a/contrib/devtools/lint-logs.sh b/contrib/devtools/lint-logs.sh index 3bb54359a8..35be13ec19 100755 --- a/contrib/devtools/lint-logs.sh +++ b/contrib/devtools/lint-logs.sh @@ -13,12 +13,13 @@ # ignored -UNTERMINATED_LOGS=$(git grep "LogPrintf(" -- "*.cpp" | \ +UNTERMINATED_LOGS=$(git grep --extended-regexp "LogPrintf?\(" -- "*.cpp" | \ grep -v '\\n"' | \ grep -v "/\* Continued \*/" | \ + grep -v "LogPrint()" | \ grep -v "LogPrintf()") if [[ ${UNTERMINATED_LOGS} != "" ]]; then - echo "All calls to LogPrintf() should be terminated with \\n" + echo "All calls to LogPrintf() and LogPrint() should be terminated with \\n" echo echo "${UNTERMINATED_LOGS}" exit 1 -
laanwj commented at 1:11 PM on May 2, 2018: member
@MarcoFalke thanks, will add that and fix the remaining cases.
-
ff2ad2d569
Add missing newlines to LogPrint debug logging
The linter only checked `LogPrintf`, not `LogPrint`. Fix the remaining cases.
-
devtools: Make linter check LogPrint calls 4b75dcf0ec
- laanwj renamed this:
net: Add missing newlines to debug logging
Add missing newlines to debug logging
on May 2, 2018 - laanwj force-pushed on May 2, 2018
-
MarcoFalke commented at 1:19 PM on May 2, 2018: member
utACK 4b75dcf0ec7beecc9a4638305d1beed9477ba06e
-
promag commented at 1:41 PM on May 2, 2018: member
utACK 4b75dcf.
- laanwj merged this on May 2, 2018
- laanwj closed this on May 2, 2018
- laanwj referenced this in commit ef46c9904b on May 2, 2018
- UdjinM6 referenced this in commit 406006f652 on Jul 29, 2020
- UdjinM6 referenced this in commit 27b03bdbee on Jul 29, 2020
- PastaPastaPasta referenced this in commit 2af1c8d6e7 on Jul 29, 2020
- MarcoFalke locked this on Sep 8, 2021