Skip to content

Commit

Permalink
Create .clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-johansson committed Dec 7, 2023
1 parent 06402a8 commit 00ed4c4
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
Checks: "-*,
clang-analyzer-*,
performance-*,
portability-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-pro-type-member-init,
readability-*,
-readability-identifier-length,
-readability-uppercase-literal-suffix,
-readability-magic-numbers,
-readability-implicit-bool-conversion,
-readability-else-after-return,
-readability-named-parameter,
modernize-*,
-modernize-avoid-c-arrays,
misc-*,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
"
CheckOptions:
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.EnumCase, value: CamelCase }

- { key: readability-identifier-naming.TypeAliasCase, value: CamelCase }
- { key: readability-identifier-naming.TypeAliasIgnoredRegexp, value: "^[a-z].*" } # Allow aliases such as 'uint8'

- { key: readability-identifier-naming.EnumConstantCase, value: CamelCase }
- { key: readability-identifier-naming.EnumConstantPrefix, value: k }

- { key: readability-identifier-naming.GlobalFunctionCase, value: lower_case }
- { key: readability-identifier-naming.FunctionCase, value: lower_case }
- { key: readability-identifier-naming.FunctionIgnoredRegexp, value: "^_.*" }

- { key: readability-identifier-naming.MethodCase, value: lower_case }
- { key: readability-identifier-naming.PrivateMethodPrefix, value: _ }

- { key: readability-identifier-naming.ParameterCase, value: lower_case }
- { key: readability-identifier-naming.LocalVariableCase, value: lower_case }

- { key: readability-identifier-naming.GlobalConstantCase, value: CamelCase }
- { key: readability-identifier-naming.GlobalConstantPrefix, value: k }

- { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase }
- { key: readability-identifier-naming.ConstexprVariablePrefix, value: k }

- { key: readability-identifier-naming.GlobalVariableCase, value: CamelCase }
- { key: readability-identifier-naming.GlobalVariablePrefix, value: g }

- { key: readability-identifier-naming.ClassMemberCase, value: CamelCase }
- { key: readability-identifier-naming.ClassMemberPrefix, value: m }
- { key: readability-identifier-naming.StructMemberCase, value: lower_case }

- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.InlineNamespaceCase, value: lower_case }

0 comments on commit 00ed4c4

Please sign in to comment.