---
# Bug-finding checks only: no style rules, and nothing that flags deliberate
# low-level / kernel-style C (casts, narrowing, __reserved names, goto,
# assignments in conditions, !strcmp(), switches without default).
#
# clangd runs these live in the editor, except the clang-analyzer-* checks
# (deeper, slower), which only `run-clang-tidy -p build/debug` runs.
Checks: >
  -*,
  bugprone-*,
  -bugprone-assignment-in-if-condition,
  -bugprone-branch-clone,
  -bugprone-casting-through-void,
  -bugprone-easily-swappable-parameters,
  -bugprone-implicit-widening-of-multiplication-result,
  -bugprone-inc-dec-in-conditions,
  -bugprone-macro-parentheses,
  -bugprone-multi-level-implicit-pointer-conversion,
  -bugprone-narrowing-conversions,
  -bugprone-reserved-identifier,
  -bugprone-signed-char-misuse,
  -bugprone-switch-missing-default-case,
  -bugprone-tagged-union-member-count,
  -bugprone-unsafe-functions,
  clang-analyzer-*,
  -clang-analyzer-optin.*,
  -clang-analyzer-security.*,
  misc-redundant-expression
CheckOptions:
  # Allow `if (!strcmp(a, b))`; still catches `strcmp(a, b) == 1` and the like.
  bugprone-suspicious-string-compare.WarnOnImplicitComparison: false
WarningsAsErrors: ''
HeaderFilterRegex: '.*/src/.*'
