---
# Clang-Tidy configuration for profiler-hub
# https://clang.llvm.org/extra/clang-tidy/

Checks: >
  -*,
  bugprone-*,
  clang-analyzer-*,
  cppcoreguidelines-*,
  misc-*,
  modernize-*,
  performance-*,
  readability-*,
  -modernize-use-trailing-return-type,
  -readability-magic-numbers,
  -cppcoreguidelines-avoid-magic-numbers,
  -cppcoreguidelines-pro-bounds-pointer-arithmetic,
  -cppcoreguidelines-pro-type-reinterpret-cast,
  -cppcoreguidelines-owning-memory,
  -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
  -cppcoreguidelines-avoid-c-arrays,
  -modernize-avoid-c-arrays,
  -readability-identifier-length,
  -bugprone-easily-swappable-parameters,
  -misc-include-cleaner

WarningsAsErrors: ''

HeaderFilterRegex: '.*/profiler-hub/(include|source)/.*\.hpp$'

CheckOptions:
  # Naming conventions (snake_case style)
  - key: readability-identifier-naming.ClassCase
    value: lower_case
  - 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.ParameterCase
    value: lower_case
  - key: readability-identifier-naming.PrivateMemberPrefix
    value: 'm_'
  - key: readability-identifier-naming.ProtectedMemberPrefix
    value: 'm_'
  - key: readability-identifier-naming.ConstantCase
    value: lower_case
  - key: readability-identifier-naming.EnumConstantCase
    value: lower_case
  - key: readability-identifier-naming.NamespaceCase
    value: lower_case
  - key: readability-identifier-naming.TypeAliasCase
    value: lower_case
  - key: readability-identifier-naming.TypeAliasSuffix
    value: '_t'
  - key: readability-identifier-naming.TypedefCase
    value: lower_case
  - key: readability-identifier-naming.TypedefSuffix
    value: '_t'

  # Modernize settings
  - key: modernize-use-override.IgnoreDestructors
    value: true
  - key: modernize-use-nullptr.NullMacros
    value: 'NULL'

  # Performance settings
  - key: performance-move-const-arg.CheckTriviallyCopyableMove
    value: false
  - key: performance-unnecessary-value-param.AllowedTypes
    value: 'std::shared_ptr;std::unique_ptr'

  # Readability settings
  - key: readability-function-cognitive-complexity.Threshold
    value: 50
  - key: readability-braces-around-statements.ShortStatementLines
    value: 1

  # Misc settings
  - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
    value: true
...
