From 8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:51:18 +0100 Subject: core: Add clang-tidy (#8664) This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright. --- src/debug/Log.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/debug/Log.hpp') diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp index d3190d4f..9696aa90 100644 --- a/src/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -11,7 +11,7 @@ #define LOGMESSAGESIZE 1024 #define ROLLING_LOG_SIZE 4096 -enum LogLevel { +enum eLogLevel : int8_t { NONE = -1, LOG = 0, WARN, @@ -21,6 +21,7 @@ enum LogLevel { TRACE }; +// NOLINTNEXTLINE(readability-identifier-naming) namespace Debug { inline std::string logFile; inline std::ofstream logOfs; @@ -38,10 +39,11 @@ namespace Debug { void close(); // - void log(LogLevel level, std::string str); + void log(eLogLevel level, std::string str); template - void log(LogLevel level, std::format_string fmt, Args&&... args) { + //NOLINTNEXTLINE + void log(eLogLevel level, std::format_string fmt, Args&&... args) { std::lock_guard guard(logMutex); if (level == TRACE && !trace) -- cgit v1.2.3