diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-12-07 18:51:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-07 18:51:18 +0100 |
| commit | 8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 (patch) | |
| tree | 5b6654818049a0743f62defc090e86d4327cccbb /src/debug/Log.hpp | |
| parent | b1e5cc66bdb20b002c93479490c3a317552210b3 (diff) | |
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.
Diffstat (limited to 'src/debug/Log.hpp')
| -rw-r--r-- | src/debug/Log.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 <typename... Args> - void log(LogLevel level, std::format_string<Args...> fmt, Args&&... args) { + //NOLINTNEXTLINE + void log(eLogLevel level, std::format_string<Args...> fmt, Args&&... args) { std::lock_guard<std::mutex> guard(logMutex); if (level == TRACE && !trace) |
