From fcb3ded4546c3ae24f1a38473976cd5a3651691a Mon Sep 17 00:00:00 2001
From: Luca Bilke <bilke@tralios.de>
Date: Fri, 24 Nov 2023 15:41:58 +0100
Subject: [PATCH] cleanup

---
 .clang-format |  8 ++++++++
 .clang-tidy   | 30 ++++++++++++++++++++++++++++++
 .clangd       |  3 +++
 .gitignore    |  4 ++--
 4 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 .clang-format
 create mode 100644 .clang-tidy
 create mode 100644 .clangd

diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..299675f
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,8 @@
+BasedOnStyle: Google
+IndentWidth: 4
+InsertBraces: true
+ColumnLimit: 79
+AlignConsecutiveMacros: Consecutive
+AllowShortFunctionsOnASingleLine: None
+AllowShortLoopsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: Never
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0000000..17ce268
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,30 @@
+Checks: |
+  -*,
+  abseil-*,
+  bugprone-*,
+  clang-analyzer-*,
+  misc-*,
+  modernize-*,
+  performance-*,
+  portability-*,
+  readability-*,
+  llvm-*,
+  -bugprone-easily-swappable-parameters,
+  -readability-avoid-const-params-in-decls,
+  -readability-identifier-length
+
+CheckOptions:
+  - key: readability-inconsistent-declaration-parameter-name.Strict
+    value: true
+  - key: readability-identifier-naming.StructCase
+    value: lower_case
+  - key: readability-identifier-naming.FunctionCase
+    value: lower_case
+  - key: readability-identifier-naming.VariableCase
+    value: lower_case
+  - key: readability-identifier-naming.EnumConstantCase
+    value: UPPER_CASE
+  - key: readability-identifier-naming.MacroDefinitionCase
+    value: UPPER_CASE
+  - key: readability-function-cognitive-complexity.Threshold
+    value: 15
diff --git a/.clangd b/.clangd
new file mode 100644
index 0000000..f8cd025
--- /dev/null
+++ b/.clangd
@@ -0,0 +1,3 @@
+Diagnostics:
+  UnusedIncludes: Strict
+  MissingIncludes: Strict
diff --git a/.gitignore b/.gitignore
index 9e8a090..fe2faa5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
 build
 *.o
-
-pinentry-dmenu
\ No newline at end of file
+pinentry-dmenu
+compile_commands.json