---
Checks: >-
  bugprone-*,
  cert-*,
  clang-analyzer-*,
  concurrency-*,
  cppcoreguidelines-*,
  llvm-*,
  misc-*,
  modernize-*,
  performance-*,
  portability-*,
  readability-*,
  -abseil-*,
  -altera-*,
  -android-*,
  -boost-*,
  -darwin-*,
  -fuchsia-*,
  -google-*,
  -hicpp-*,
  -linuxkernel-*,
  -llvmlibc-*,
  -mpi-*,
  -objc-*,
  -openmp-*,
  -webkit-*,
  -zircon-*,
  -bugprone-easily-swappable-parameters,
  -cppcoreguidelines-avoid-magic-numbers,
  -cppcoreguidelines-non-private-member-variables-in-classes,
  -llvm-header-guard,
  -llvm-prefer-isa-or-dyn-cast-in-conditionals,
  -llvm-prefer-register-over-unsigned,
  -llvm-twine-local,
  -llvm-use-new-mlir-op-builder,
  -misc-no-recursion,
  -misc-non-private-member-variables-in-classes,
  -misc-use-anonymous-namespace,
  -performance-enum-size,
  -portability-restrict-system-includes,
  -readability-identifier-length,
  -readability-magic-numbers,
  -clang-analyzer-optin.cplusplus.UninitializedObject,
  -clang-analyzer-optin.core.EnumCastOutOfRange

# clang-analyzer-optin.cplusplus.UninitializedObject is disabled above:
# it false-positives on toml++'s formatter classes, which deliberately
# leave some fields uninitialized in the constructor and set them later
# in attach(). The diagnostic is anchored inside the vendored header
# itself, so it can't be suppressed with a NOLINT at the call site.
#
# clang-analyzer-optin.core.EnumCastOutOfRange is disabled above for the
# same reason: it false-positives on toml++'s TOML_MAKE_FLAGS macro,
# whose generated operator~ deliberately bitwise-inverts a flag enum's
# underlying value, producing a result with no matching named
# enumerator by design. The diagnostic is anchored inside the vendored
# header itself (in the macro body), so it can't be suppressed with a
# NOLINT at the call site.

WarningsAsErrors: '*'

# Warn on the project's own headers only, via an explicit allowlist of
# first-party subdirectories under src/. This must be an allowlist rather
# than a "not extern/" exclusion because llvm::Regex (POSIX ERE, used to
# evaluate this option) has no lookahead support, so a negative-lookahead
# pattern (e.g. the previous '.*/src/(?!pcg-cpp)') silently fails to
# exclude anything, and every header under src/ -- including vendored
# third-party code in src/extern -- has effectively been unfiltered all
# along.
HeaderFilterRegex: '.*/src/(core|interpolation|io|nebular|pdfs|phot|pybind|specsyn|tracks|utils)/'

FormatStyle: 'llvm'

CheckOptions:
  # Naming conventions matching project style (camelBack methods/members,
  # trailing underscore on members, CamelCase types, lower_case namespaces)
  - 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.FunctionCase
    value: camelBack
  - key: readability-identifier-naming.MethodCase
    value: camelBack
  - key: readability-identifier-naming.MemberCase
    value: camelBack
  - key: readability-identifier-naming.MemberSuffix
    value: '_'
  - key: readability-identifier-naming.VariableCase
    value: camelBack
  - key: readability-identifier-naming.ParameterCase
    value: camelBack
  - key: readability-identifier-naming.EnumCase
    value: CamelCase
  - key: readability-identifier-naming.EnumConstantCase
    value: camelBack
  - key: readability-identifier-naming.TypeAliasCase
    value: CamelCase
  - key: readability-identifier-naming.TypedefCase
    value: camelBack
  - key: readability-identifier-naming.TemplateParameterCase
    value: CamelCase
