# Callback signatures fix parameter order, Annex K *_s APIs are not portable,
# and the public C headers consistently use the supported pragma form. Their
# corresponding heuristics are excluded while the substantive groups remain.
Checks: >
  bugprone-*,
  -bugprone-easily-swappable-parameters,
  clang-analyzer-*,
  -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
  performance-*,
  portability-*,
  -portability-avoid-pragma-once,
  readability-avoid-const-params-in-decls,
  readability-braces-around-statements,
  readability-container-size-empty,
  readability-duplicate-include,
  readability-inconsistent-declaration-parameter-name,
  readability-misleading-indentation,
  readability-redundant-control-flow,
  readability-redundant-declaration,
  readability-redundant-function-ptr-dereference,
  readability-redundant-preprocessor,
  readability-redundant-smartptr-get,
  readability-redundant-string-cstr,
  readability-redundant-string-init,
  readability-simplify-boolean-expr
WarningsAsErrors: '*'
HeaderFilterRegex: '^(.*/)?src/'
CheckOptions:
  # Braces on every body, with no length below which one may be left off: the
  # formatter inserts them, and this is what refuses a file it never saw.
  readability-braces-around-statements.ShortStatementLines: 0
  # A shift distance is written as a plain `8`, which is an `int`. clang-tidy 20
  # and later count that as a signed operand, so every `>> 8` in hardware-word
  # code reads as a finding. The check still reports signed values, which is
  # what it is here for.
  bugprone-signed-bitwise.IgnorePositiveIntegerLiterals: true
