From 0596406113aee63d92d7b914ef8d63799ab66a39 Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 14 Jan 2020 23:45:39 +0100 Subject: [PATCH] Silence false positive clang-tidy warnings in log.hpp. --- src/log.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/log.hpp b/src/log.hpp index 4d709b4..151d799 100644 --- a/src/log.hpp +++ b/src/log.hpp @@ -23,7 +23,7 @@ namespace mastodonpp { -using std::cerr; +using std::cerr; // NOLINT(misc-unused-using-decls) using std::string_view; //! @private @@ -40,13 +40,16 @@ constexpr auto shorten_filename(const string_view &filename) return filename; } +// NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define commonlog cerr << '[' << shorten_filename(__FILE__) \ << ':' << __LINE__ << ']' #ifndef NDEBUG +// NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define debuglog commonlog << " DEBUG: " #else #define debuglog false && cerr #endif +// NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define errorlog commonlog << " ERROR: " } // namespace mastodonpp