From 0f0481955d6a8326d62b12b7b40654314f253d10 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Tue, 7 Feb 2023 22:00:07 +0100 Subject: [PATCH] Tell clang-tidy that `L` is a fine name for a local pointer --- .clang-tidy | 4 ++++ src/controllers/plugins/PluginController.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index e1d6bfca6..7e0a62934 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -54,3 +54,7 @@ CheckOptions: value: camelBack - key: readability-implicit-bool-conversion.AllowPointerConditions value: true + + # Lua state + - key: readability-identifier-naming.LocalPointerIgnoredRegexp + value: ^L$ diff --git a/src/controllers/plugins/PluginController.cpp b/src/controllers/plugins/PluginController.cpp index cbe9aff79..6cd30810e 100644 --- a/src/controllers/plugins/PluginController.cpp +++ b/src/controllers/plugins/PluginController.cpp @@ -287,7 +287,7 @@ QString PluginController::tryExecPluginCommand(const QString &commandName, { const auto &funcName = it->second; - auto *L = plugin->state_; // NOLINT + auto *L = plugin->state_; lua_getfield(L, LUA_REGISTRYINDEX, funcName.toStdString().c_str()); lua::push(L, ctx);