From: Otto Moerbeek Date: Mon, 8 May 2023 12:01:40 +0000 (+0200) Subject: Add // NOLINT(readability-function-cognitive-complexity) X-Git-Tag: rec-4.9.0-beta1~19^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33c76ef0a6c6a08b7da7028c3d209788ff87d4fa;p=thirdparty%2Fpdns.git Add // NOLINT(readability-function-cognitive-complexity) Once readability-function-cognitive-complexity.IgnoreMacros works in CI, these annotations can be removed. It currenlty does not work as clang-12 does not support it. --- diff --git a/.clang-tidy.full b/.clang-tidy.full index 43754f5983..e4a95882a6 100644 --- a/.clang-tidy.full +++ b/.clang-tidy.full @@ -253,7 +253,7 @@ CheckOptions: - key: modernize-pass-by-value.ValuesOnly value: 'false' - key: readability-function-cognitive-complexity.IgnoreMacros - value: 'true' + value: 'false' - key: modernize-loop-convert.IncludeStyle value: llvm - key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index f8708ec21a..0746901882 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -1734,7 +1734,7 @@ static void initSNMP([[maybe_unused]] Logr::log_t log) } } -static int initControl(Logr::log_t log, uid_t newuid, int forks) // NOLINT(bugprone-easily-swappable-parameter*) +static int initControl(Logr::log_t log, uid_t newuid, int forks) // NOLINT(bugprone-easily-swappable-parameter*) #12791 Remove NOLINT(readability-function-cognitive-complexity) omoerbeek { if (!::arg()["chroot"].empty()) { #ifdef HAVE_SYSTEMD @@ -1864,7 +1864,7 @@ static int initDNS64(Logr::log_t log) return 0; } -static int serviceMain(Logr::log_t log) +static int serviceMain(Logr::log_t log) // NOLINT(readability-function-cognitive-complexity) #12791 Remove NOLINT(readability-function-cognitive-complexity) omoerbeek { g_log.setName(g_programname); g_log.disableSyslog(::arg().mustDo("disable-syslog")); @@ -2219,7 +2219,7 @@ private: const string name; }; -static void houseKeeping0(Logr::log_t log) +static void houseKeeping0(Logr::log_t log) // NOLINT(readability-function-cognitive-complexity) #12791 Remove NOLINT(readability-function-cognitive-complexity) omoerbeek { struct timeval now { @@ -2549,7 +2549,7 @@ static void recLoop() } } -static void recursorThread() +static void recursorThread() // NOLINT(readability-function-cognitive-complexity) #12791 Remove NOLINT(readability-function-cognitive-complexity) omoerbeek { auto log = g_slog->withName("runtime"); t_Counters.updateSnap(true); @@ -3030,7 +3030,7 @@ static pair doConfig(Logr::log_t startupLog, const string& configname return {0, false}; } -int main(int argc, char** argv) +int main(int argc, char** argv) // NOLINT(readability-function-cognitive-complexity) #12791 Remove NOLINT(readability-function-cognitive-complexity) omoerbeek { g_argc = argc; g_argv = argv;