summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-format10
-rw-r--r--.clang-tidy31
2 files changed, 41 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..b07b47c
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,10 @@
+---
+BasedOnStyle: LLVM
+---
+Language: Cpp
+DerivePointerAlignment: false
+PointerAlignment: Left
+AlwaysBreakTemplateDeclarations: Yes
+IndentWidth: 8
+UseTab: AlignWithSpaces
+---
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0000000..e225e47
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,31 @@
+---
+Checks: "*, \
+ -altera-struct-pack-align, \
+ -altera-unroll-loops, \
+ -altera-id-dependent-backward-branch, \
+ -bugprone-easily-swappable-parameters, \
+ -cppcoreguidelines-avoid-magic-numbers, \
+ -cppcoreguidelines-non-private-member-variables-in-classes, \
+ -fuchsia-default-arguments-calls, \
+ -fuchsia-default-arguments-declarations, \
+ -fuchsia-overloaded-operator, \
+ -fuchsia-trailing-return, \
+ -google-build-using-namespace, \
+ -google-runtime-int, \
+ -llvmlibc-callee-namespace, \
+ -llvmlibc-implementation-in-namespace, \
+ -llvmlibc-restrict-system-libc-headers, \
+ -modernize-use-trailing-return-type, \
+ -misc-non-private-member-variables-in-classes, \
+ -readability-magic-numbers"
+WarningsAsErrors: "*"
+HeaderFilterRegex: "."
+CheckOptions:
+ - { key: readability-identifier-naming.ClassCase, value: CamelCase }
+ - { key: readability-identifier-naming.EnumCase, value: CamelCase }
+ - { key: readability-identifier-naming.FunctionCase, value: lower_case }
+ - { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
+ - { key: readability-identifier-naming.NamespaceCase, value: lower_case }
+ - { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ }
+ - { key: readability-identifier-naming.StructCase, value: CamelCase }
+ - { key: readability-function-cognitive-complexity.IgnoreMacros, value: "true" }