summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy2
-rwxr-xr-xci/no_assert_check.sh2
-rw-r--r--contrib/meson.build3
-rw-r--r--daemon/defer.c3
-rw-r--r--lib/meson.build1
5 files changed, 7 insertions, 4 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 4d77c1a7..32816a96 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -16,6 +16,7 @@ Checks: |-
-bugprone-sizeof-expression,
-bugprone-suspicious-string-compare,
-cert-dcl03-c,
+ -cert-dcl16-c,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-clang-analyzer-unix.Malloc,
@@ -37,6 +38,7 @@ Checks: |-
-readability-magic-numbers,
-readability-non-const-parameter,
-readability-redundant-declaration,
+ -readability-uppercase-literal-suffix,
-clang-analyzer-core.UndefinedBinaryOperatorResult
# TODO: remove `-clang-analyzer-core.UndefinedBinaryOperatorResult` when we
diff --git a/ci/no_assert_check.sh b/ci/no_assert_check.sh
index 610011a1..4bb7ccfc 100755
--- a/ci/no_assert_check.sh
+++ b/ci/no_assert_check.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-grep '\<assert\>' -- $(git ls-files | grep '\.[hc]$' | grep -vE '^(contrib|bench|tests|daemon/rrl)/')
+grep '\<assert\>' -- $(git ls-files | grep '\.[hc]$' | grep -vE '^(contrib|bench|tests|daemon/ratelimiting.test|lib/kru)/')
test $? -eq 1
diff --git a/contrib/meson.build b/contrib/meson.build
index 5d97e889..e7dccae9 100644
--- a/contrib/meson.build
+++ b/contrib/meson.build
@@ -10,7 +10,8 @@ contrib_src = files([
'murmurhash3/murmurhash3.c',
'base32hex.c',
'base64.c',
- 'base64url.c'
+ 'base64url.c',
+ 'openbsd/siphash.c',
])
contrib_inc = include_directories('.', '..')
diff --git a/daemon/defer.c b/daemon/defer.c
index 89d79265..1908f478 100644
--- a/daemon/defer.c
+++ b/daemon/defer.c
@@ -21,7 +21,8 @@
#define KRU_CAPACITY (1<<10)
#define MAX_DECAY (KRU_LIMIT * 0.0006929) // -> halving counters in 1s
-#define TIME_MULT 1/1 // max fraction of rate limit filled by one cpu (multiplies large int)
+#define TIME_MULT 1/1 // NOLINT for now, TODO improve readability
+ // max fraction of rate limit filled by one cpu (multiplies large int)
// TODO divide by #cpus?
#define REQ_TIMEOUT 5000000 // ns (THREAD_CPUTIME), older deferred queries are dropped
diff --git a/lib/meson.build b/lib/meson.build
index 9f611e3a..e369a452 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -40,7 +40,6 @@ libkres_src = files([
'selection_iter.c',
'utils.c',
'zonecut.c',
- '../contrib/openbsd/siphash.c', # needed for kru
])
c_src_lint += libkres_src