Checks:
  - readability-*
  - modernize-*
  - performance-*
  - bugprone-*
  - -readability-identifier-length
  - -readability-magic-numbers
  - -bugprone-integer-division
  - -bugprone-easily-swappable-parameters
  - -bugprone-narrowing-conversions
  - -modernize-avoid-c-arrays
  # No forçar reemplaç de bucles "normals" per std::any_of/std::all_of.
  # Equivalent a `--suppress=useStlAlgorithm` que ja tenim a cppcheck.
  - -readability-use-anyofallof
  # performance-noexcept-move-constructor crashea clang-tidy (LLVM 19.1)
  # con recursión infinita en ExceptionSpecAnalyzer::analyzeRecord cuando
  # analiza ciertas instanciaciones de std::set. No es un falso positivo
  # sobre nuestro código: el check ni siquiera llega a evaluar el patrón.
  - -performance-noexcept-move-constructor

WarningsAsErrors: '*'
# Headers nostres (excloem source/external/ que conté dependències de tercers no editables)
HeaderFilterRegex: 'source/(core|game|utils)/'
FormatStyle: file

CheckOptions:
  # bugprone-empty-catch: aceptar catches vacíos marcados con @INTENTIONAL en un comentario
  - { key: bugprone-empty-catch.IgnoreCatchWithKeywords, value: '@INTENTIONAL' }

  # =====================================================================
  # CONSTANTES → UPPER_CASE (compile-time y runtime, en cualquier scope)
  # =====================================================================
  # Todo lo que sea const o constexpr se identifica visualmente en UPPER_CASE,
  # sin importar si es global, local, miembro o static.

  # constexpr en cualquier scope (globales y locales)
  - { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE }

  # Constantes globales (const no-constexpr)
  - { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }

  # Constantes locales (const en función)
  - { key: readability-identifier-naming.LocalConstantCase, value: UPPER_CASE }

  # Static const a nivel de archivo/namespace
  - { key: readability-identifier-naming.StaticConstantCase, value: UPPER_CASE }

  # Miembros static const/constexpr de clase (p.ej. static constexpr int MAX = 100;)
  - { key: readability-identifier-naming.ClassConstantCase, value: UPPER_CASE }

  # Miembros const no-static de clase (p.ej. const int limit;)
  - { key: readability-identifier-naming.ConstantMemberCase, value: UPPER_CASE }

  # Valores de enums
  - { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }

  # NOTA: Los parámetros const NO se tratan como constantes aquí.
  # Un parámetro sigue siendo un parámetro aunque sea const → hereda ParameterCase.

  # =====================================================================
  # VARIABLES NO-CONST
  # =====================================================================

  # Variables locales
  - { key: readability-identifier-naming.VariableCase, value: lower_case }
  - { key: readability-identifier-naming.LocalVariableCase, value: lower_case }

  # Parámetros de función
  - { key: readability-identifier-naming.ParameterCase, value: lower_case }

  # Variables estáticas no-const (static locales, static file-scope,
  # y static members no-const de clase como el instance_ de un Singleton).
  # Sufijo _ para marcar que tienen storage estático.
  - { key: readability-identifier-naming.StaticVariableCase, value: lower_case }
  - { key: readability-identifier-naming.StaticVariableSuffix, value: _ }

  # =====================================================================
  # MIEMBROS DE CLASE NO-CONST
  # =====================================================================
  # Privados: snake_case con sufijo _
  - { key: readability-identifier-naming.PrivateMemberCase, value: lower_case }
  - { key: readability-identifier-naming.PrivateMemberSuffix, value: _ }

  # Protegidos: snake_case con sufijo _
  - { key: readability-identifier-naming.ProtectedMemberCase, value: lower_case }
  - { key: readability-identifier-naming.ProtectedMemberSuffix, value: _ }

  # Públicos: snake_case sin sufijo
  - { key: readability-identifier-naming.PublicMemberCase, value: lower_case }

  # =====================================================================
  # TIPOS
  # =====================================================================
  - { 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.UnionCase, value: CamelCase }
  - { key: readability-identifier-naming.TypeAliasCase, value: CamelCase }
  - { key: readability-identifier-naming.TypedefCase, value: CamelCase }
  - { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase }

  # Namespaces
  - { key: readability-identifier-naming.NamespaceCase, value: CamelCase }

  # =====================================================================
  # FUNCIONES Y MÉTODOS (incluyendo constexpr)
  # =====================================================================
  # Un método/función constexpr es un invocable, no una constante → camelBack.
  - { key: readability-identifier-naming.FunctionCase, value: camelBack }
  - { key: readability-identifier-naming.ConstexprFunctionCase, value: camelBack }
  - { key: readability-identifier-naming.MethodCase, value: camelBack }
  - { key: readability-identifier-naming.PrivateMethodCase, value: camelBack }
  - { key: readability-identifier-naming.ProtectedMethodCase, value: camelBack }
  - { key: readability-identifier-naming.PublicMethodCase, value: camelBack }
  - { key: readability-identifier-naming.ConstexprMethodCase, value: camelBack }
