# This file is used for IDE integration with common rules.
# Keep in sync with ./clang-tidy/run-clang-tidy.yaml

Checks: >
  clang-analyzer-*,
  -clang-analyzer-optin.core.EnumCastOutOfRange,
  clang-diagnostic-*,
  -clang-diagnostic-ignored-gch,
  cppcoreguidelines-*,
  -cppcoreguidelines-avoid-do-while,
  -cppcoreguidelines-avoid-non-const-global-variables,
  -cppcoreguidelines-pro-bounds-array-to-pointer-decay, 
  -cppcoreguidelines-pro-type-vararg,
  cert-*,
  -cert-err58-cpp,
  performance-*,
  -performance-inefficient-string-concatenation,
  modernize-make-*,
  modernize-use-emplace,
  bugprone-*,
  -bugprone-easily-swappable-parameters

CheckOptions:
  - key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor # Handy for base classes with virtual default destructors
    value: "true"
# clang-analyzer-optin.core.EnumCastOutOfRange:
#   Limitation https://clang.llvm.org/docs/analyzer/checkers.html#optin-core-enumcastoutofrange-c-c
# cppcoreguidelines-avoid-c-arrays:
#   https://rocm.docs.amd.com/projects/llvm-project/en/develop/LLVM/clang-tools/html/clang-tidy/checks/modernize/avoid-c-arrays.html
# cppcoreguidelines-pro-bounds-array-to-pointer-decay:
#   caused by logging macros
# cppcoreguidelines-pro-type-vararg:
#   caused by c style functions like open
# cppcoreguidelines-avoid-do-while:
#   general consensus is that do-while loops are fine and do not affect readability
#   https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es75-avoid-do-statements
# cppcoreguidelines-avoid-non-const-global-variables
#   We rely on global variables for signals environment variables and avoiding singleton
#   https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-global

# cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor Handy for base classes with virtual default destructors
