# -*- yaml -*-

Checks:
  # desired group patterns
  - bugprone-*
  - cert-*
  - clang-analyzer-*
  - concurrency-*
  - linuxkernel-*
  - misc-*
  - modernize-*
  - performance-*
  - portability-*
  - readability-*

  # TODO: currently required exclusions; fix as many as possible.
  # review fixes carefully so as not to simply mask an underlying mistake!
  - -bugprone-branch-clone # TODO: enable and autofix
  - -bugprone-easily-swappable-parameters
  - -bugprone-implicit-widening-of-multiplication-result
  - -bugprone-macro-parentheses
  - -bugprone-multi-level-implicit-pointer-conversion
  - -bugprone-narrowing-conversions
  - -bugprone-reserved-identifier
  - -bugprone-unchecked-string-to-number-conversion # sscanf is useful
  - -cert-dcl37-c
  - -cert-dcl51-cpp
  - -cert-err33-c
  - -cert-err34-c
  - -cert-int09-c # too useful for bitfields
  - -clang-analyzer-core.NullDereference
  - -clang-analyzer-optin.core.EnumCastOutOfRange
  - -clang-analyzer-optin.performance.Padding # not useful enough
  - -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
  - -clang-analyzer-unix.Malloc # issues with g_autofree, g_auto
  - -concurrency-mt-unsafe
  - -misc-header-include-cycle
  - -misc-include-cleaner
  - -misc-no-recursion
  - -misc-unused-parameters # difficult with GObject-style C
  - -modernize-macro-to-enum
  - -readability-avoid-unconditional-preprocessor-if
  - -readability-braces-around-statements # causes a huge diff
  - -readability-enum-initial-value
  - -readability-function-cognitive-complexity # may need tweaking, long test functions, etc.
  - -readability-function-size # FIXME: revisit once IgnoreMacros option is broadly available
  - -readability-identifier-length
  - -readability-magic-numbers
  - -readability-non-const-parameter # not useful enough
  - -readability-suspicious-call-argument
  - -readability-uppercase-literal-suffix
  - -portability-avoid-pragma-once # too useful to remove

WarningsAsErrors: "*"
