# Curated rather than inherited. The default check sets bury real findings under
# thousands of stylistic ones on a tree of this age: bugprone-narrowing-conversions
# alone fires on every `static float x = 0.0;` in the firmware, which is the
# house style and not a defect, and misc-include-cleaner fights the umbrella
# headers the tree uses on purpose.
#
# What is left is the analysis that finds bugs: clang-analyzer's path-sensitive
# checks, and the bugprone and misc checks that are not about house style.
#
# bugprone-macro-parentheses is off for one reason worth writing down. It has
# three findings, all in util/utils_math.h, on UTILS_NAN_ZERO and UTILS_LP_FAST:
# the assignment target is not parenthesised. Real, and worth reporting
# upstream, but misusing either is a compile error rather than silent
# misbehaviour, and those macros are used across the whole tree -- changing them
# is not this branch's business. Off so the rest stays green and therefore gets
# read.
#
# Run it through tests/check.sh, which passes the flags a firmware file needs to
# parse at all.
Checks: '-*,clang-analyzer-*,bugprone-*,misc-*,performance-*,-bugprone-narrowing-conversions,-bugprone-easily-swappable-parameters,-bugprone-reserved-identifier,-bugprone-assignment-in-if-condition,-bugprone-macro-parentheses,-misc-include-cleaner,-misc-no-recursion'

# Deliberately not WarningsAsErrors: '*'. That counts warnings raised inside
# system headers, which are neither displayed nor fixable, so clang-tidy exits
# non-zero with nothing printed -- the worst thing a CI stage can do. check.sh
# decides instead, by failing when clang-tidy prints a diagnostic for a file
# that is ours.

HeaderFilterRegex: '(applications|util|comm|motor|tests)/.*'

FormatStyle: none
