# clang-tidy 22 profile (the style's rules). Warnings are errors in tools/check.sh.
# Deliberately disabled:
#   bugprone-random-generator-seed      fixed seeds keep tests reproducible
#   pro-bounds-avoid-unchecked-...      bounds checks come from the hardened
#                                       standard library builds (the asan preset)
#   portability-avoid-pragma-once       supported by every compiler we use
#   readability-math-missing-parentheses  would clutter every formula
Checks: >
  -*,
  bugprone-*,
  -bugprone-easily-swappable-parameters,
  -bugprone-random-generator-seed,
  clang-analyzer-*,
  concurrency-*,
  cppcoreguidelines-*,
  -cppcoreguidelines-avoid-magic-numbers,
  -cppcoreguidelines-pro-bounds-pointer-arithmetic,
  -cppcoreguidelines-pro-bounds-constant-array-index,
  -cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,
  misc-*,
  -misc-include-cleaner,
  -misc-non-private-member-variables-in-classes,
  modernize-*,
  -modernize-use-trailing-return-type,
  performance-*,
  portability-*,
  -portability-avoid-pragma-once,
  readability-*,
  -readability-identifier-length,
  -readability-magic-numbers,
  -readability-uppercase-literal-suffix,
  -readability-math-missing-parentheses
WarningsAsErrors: '*'
HeaderFilterRegex: '.*/lunopt/(include/lunopt|tests)/.*'
CheckOptions:
  - key: readability-function-cognitive-complexity.IgnoreMacros
    value: true
  - key: readability-identifier-naming.NamespaceCase
    value: lower_case
  - 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.EnumConstantCase
    value: CamelCase
  - key: readability-identifier-naming.ScopedEnumConstantCase
    value: CamelCase
  - key: readability-identifier-naming.FunctionCase
    value: lower_case
  - key: readability-identifier-naming.VariableCase
    value: lower_case
  - key: readability-identifier-naming.TemplateParameterCase
    value: CamelCase
