Skip to content

Commit 433b525

Browse files
committed
Add LogPrintLevel to lint-format-strings, drop LogPrint-vs-LogPrintf section in dev notes
that was added in 2015 by commit b8c06ef in PR 7003, as that potential issue would now be caught by the test/lint/lint-format-strings.py script run by the CI
1 parent 45d8b1e commit 433b525

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

doc/developer-notes.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -831,11 +831,6 @@ int GetInt(Tabs tab)
831831
Strings and formatting
832832
------------------------
833833
834-
- Be careful of `LogPrint` versus `LogPrintf`. `LogPrint` takes a `category` argument, `LogPrintf` does not.
835-
836-
- *Rationale*: Confusion of these can result in runtime exceptions due to
837-
formatting mismatch, and it is easy to get wrong because of subtly similar naming.
838-
839834
- Use `std::string`, avoid C string manipulation functions.
840835
841836
- *Rationale*: C++ string handling is marginally safer, less scope for

test/lint/lint-format-strings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'LogConnectFailure,1',
2323
'LogPrint,1',
2424
'LogPrintf,0',
25+
'LogPrintLevel,2',
2526
'printf,0',
2627
'snprintf,2',
2728
'sprintf,1',

0 commit comments

Comments
 (0)