Add clang-tidy to spdm

Add a .clang-tidy configuration with the agreed-upon minimal
set of checks defined in the docs repository.

Individual checks can be added in `docs` once there is broader
agreement on their relevance and stability in OpenBMC perspective.

Change-Id: I68f80e45b9f6964391e6452bd5fc45986cf83df3
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0000000..6153e73
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,14 @@
+Checks: '
+    -*,
+    bugprone-unchecked-optional-access,
+    modernize-use-nullptr,
+    readability-function-size,
+    readability-function-cognitive-complexity
+'
+CheckOptions:
+  - { key: readability-function-size.LineThreshold,             value: 60 }
+  - { key: readability-function-size.ParameterThreshold,        value: 6 }
+  - { key: readability-function-cognitive-complexity.Threshold, value: 25 }
+
+WarningsAsErrors: '*'
+HeaderFilterRegex: '(?!^subprojects).*'