]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Basic clangd config to suppress the most stupid warnings
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 27 Jun 2022 23:25:03 +0000 (18:25 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 28 Jun 2022 12:38:10 +0000 (07:38 -0500)
.clangd [new file with mode: 0644]

diff --git a/.clangd b/.clangd
new file mode 100644 (file)
index 0000000..6c810b7
--- /dev/null
+++ b/.clangd
@@ -0,0 +1,19 @@
+# Should apply only to header files
+If:
+  PathMatch: .*\.h
+Diagnostics:
+  Suppress: [
+      # Clangd doesn't register that functions or macros are used in source files which
+      # include the header files, making these warnings useless.
+      "unused-macros",
+      "unused-function"
+  ]
+---
+# Applies to all files
+Diagnostics:
+  ClangTidy:
+    Remove: [
+      # This is stupid and warns over talloc_array_length using sizeof(foo) / sizeof(foo *)
+      # to determine the number of elements in an array.
+      "bugprone-sizeof-expression"
+    ]