]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add // NOLINT(readability-function-cognitive-complexity)
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 8 May 2023 12:01:40 +0000 (14:01 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 8 May 2023 12:50:37 +0000 (14:50 +0200)
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.

.clang-tidy.full
pdns/recursordist/rec-main.cc

index 43754f59838a427f3acb02f8741d98892265e2f0..e4a95882a62d8b846f7823fc8618fccbe5c2e905 100644 (file)
@@ -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
index f8708ec21aa63ef78824b898bffb6dd7c51f202d..0746901882d286babaa6c2ac112d93597df8bbce 100644 (file)
@@ -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<int, bool> 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;