# NOTE: following checks are disabled, because they have duplicates in other group:
#
# - readability-magic-numbers (duplicate of cppcoreguidelines-avoid-magic-numbers)
# - hicpp-no-malloc (duplicate of cppcoreguidelines-no-malloc)
# - hicpp-member-init (duplicate of cppcoreguidelines-pro-type-member-init)
# - performance-move-const-arg (duplicate of hicpp-move-const-arg)
# - bugprone-use-after-move (duplicate of hicpp-move-const-arg)

Checks: '
-*,

readability-*,
clang-analyzer-*,
cert-*,
bugprone-*,
cppcoreguidelines-*,
concurrency-*,
performance-*,
hicpp-*,

-bugprone-use-after-move,
-bugprone-easily-swappable-parameters,
-bugprone-branch-clone,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-not-null-terminated-result,
-concurrency-mt-unsafe,
-readability-named-parameter,
-readability-avoid-const-params-in-decls,
-readability-else-after-return,
-readability-redundant-access-specifiers,
-readability-magic-numbers,
-readability-function-size,
-readability-static-accessed-through-instance,
-readability-qualified-auto,
-readability-uppercase-literal-suffix,
-readability-implicit-bool-conversion,
-readability-convert-member-functions-to-static,
-readability-inconsistent-declaration-parameter-name,
-readability-container-size-empty,
-readability-simplify-boolean-expr,
-readability-make-member-function-const,
-readability-const-return-type,
-readability-function-cognitive-complexity,
-readability-use-anyofallof,
-hicpp-named-parameter,
-hicpp-avoid-c-arrays,
-hicpp-no-array-decay,
-hicpp-signed-bitwise,
-hicpp-vararg,
-hicpp-no-malloc,
-hicpp-member-init,
-hicpp-use-auto,
-hicpp-uppercase-literal-suffix,
-hicpp-use-equals-default,
-hicpp-deprecated-headers,
-cert-env33-c,
-performance-move-const-arg,
-performance-no-int-to-ptr,
-performance-unnecessary-value-param,
-performance-for-range-copy,
-clang-analyzer-core.uninitialized.UndefReturn,
-clang-analyzer-optin.cplusplus.VirtualCall,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-init-variables,
-hicpp-move-const-arg,
-hicpp-invalid-access-moved'

## Those warnings should be enabled
## They are disabled since they require a heavy API refactoring and when we enable it we clutter the code with // NOLINT comments
# -bugprone-easily-swappable-parameters
#
## the LineThreshold, StatementThreshold, BranchThreshold contains random number
## here we have to do some heavy refactoring
# -readability-function-size
# -readability-function-cognitive-complexity
#
## is it working correctly? produces hard to understand warning
# -clang-analyzer-core.uninitialized.UndefReturn
# -clang-analyzer-optin.cplusplus.VirtualCall
#
###########################################
#### A lot of code changes but easy effort:
###########################################
# -readability-qualified-auto
# -readability-convert-member-functions-to-static
# -readability-container-size-empty
# -readability-simplify-boolean-expr
# -readability-const-return-type
# -readability-use-anyofallof
# -cppcoreguidelines-avoid-magic-numbers
# -cppcoreguidelines-init-variables
# -hicpp-use-auto
# -readability-qualified-auto
# -hicpp-uppercase-literal-suffix
# -readability-uppercase-literal-suffix
# -readability-implicit-bool-conversion
# -bugprone-branch-clone
# -hicpp-use-equals-default
# -hicpp-deprecated-headers
# -cppcoreguidelines-prefer-member-initializer
# -readability-convert-member-functions-to-static
# -cppcoreguidelines-pro-type-const-cast
# -cppcoreguidelines-pro-type-member-init
# -bugprone-implicit-widening-of-multiplication-result
# -readability-inconsistent-declaration-parameter-name
# -performance-for-range-copy
# -readability-make-member-function-const

WarningsAsErrors:     '' # Treat all Checks from above as errors
HeaderFilterRegex:    ''
FormatStyle:          file
InheritParentConfig:  false

# ToDo iox-#889: re-enable the following tests:
# -hicpp-move-const-arg
# -hicpp-invalid-access-moved

CheckOptions:
  - { key: readability-identifier-naming.ClassCase,               value: CamelCase }
  - { key: readability-identifier-naming.EnumCase,                value: CamelCase }
  - { key: readability-identifier-naming.StructCase,              value: CamelCase }
  - { key: readability-identifier-naming.UnionCase,               value: CamelCase }
  - { key: readability-identifier-naming.MethodCase,              value: camelBack }
  - { key: readability-identifier-naming.FunctionCase,            value: camelBack }
  - { key: readability-identifier-naming.NamespaceCase,           value: lower_case }
  - { key: readability-identifier-naming.PrivateMemberPrefix,     value: m_ }
  - { key: readability-identifier-naming.ProtectedMemberPrefix,   value: m_ }
  - { key: readability-identifier-naming.MemberCase,              value: camelBack }
  - { key: readability-identifier-naming.ConstexprVariableCase,   value: UPPER_CASE }
  - { key: readability-identifier-naming.EnumConstantCase,        value: UPPER_CASE }
  - { key: readability-identifier-naming.GlobalConstantCase,      value: UPPER_CASE }
  - { key: readability-identifier-naming.TemplateParameterCase,   value: CamelCase }
  - { key: readability-function-size.LineThreshold,               value: 200 }
  - { key: readability-function-size.StatementThreshold,          value: 200 }
  - { key: readability-function-size.BranchThreshold,             value: 10 }
  - { key: readability-function-size.ParameterThreshold,          value: 3 }
