# Enable some categories of checks and then disable individual ones.
# The disabled checks that appear as part of the initial alphabetical section
# enabling categories (e.g. cert-err58-cpp) are ones that do not make sense for
# this codebase and we do not intend to fix.  The disabled checks appearing
# thereafter in a separate alphabetical list have yet to be triaged.  We may
# fix their errors or recategorise them as checks we don't care about.
#
# Comments on the checks we have decided are not worthwhile:
#
# * cert-dcl21-cpp (postfix operator++ and operator-- should return const objects)
# This is an unconventional code style, and conflicts with
# readability-const-return-type.
#
# * cert-env33-c (calls to system, popen)
# Unlikely to catch bugs, and using system is convenient for portability.
#
# * cert-err58-cpp (exceptions from static variable declarations)
# We have lots of memory allocations in static variable declarations, and
# that's fine.
#
# * modernize-use-auto
# We prefer an almost-always-avoid-auto style.
#
# * modernize-use-trailing-return-type
# An arbitrary style convention we haven't adopted.
#
# * readability-braces-around-statements
# Covered by astyle and buggy in clang-tidy 8.  Can enable once we have a newer
# clang-tidy.

Checks: "\
bugprone-*,\
cata-*,\
cert-*,\
-cert-dcl21-cpp,\
-cert-env33-c,\
-cert-err58-cpp,\
clang-diagnostic-*,\
cppcoreguidelines-slicing,\
google-explicit-constructor,\
llvm-namespace-comment,\
misc-*,\
modernize-*,\
-modernize-use-auto,\
-modernize-use-trailing-return-type,\
performance-*,\
readability-*,\
-readability-braces-around-statements,\
-bugprone-narrowing-conversions,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-modernize-pass-by-value,\
-modernize-return-braced-init-list,\
-modernize-use-default-member-init,\
-readability-convert-member-functions-to-static,\
-readability-else-after-return,\
-readability-function-cognitive-complexity,\
-readability-implicit-bool-conversion,\
-readability-magic-numbers,\
-readability-named-parameter,\
-readability-use-anyofallof,\
"
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|test|tools).*'
FormatStyle:     none
CheckOptions:
  - key: cata-large-inline-function.MaxStatements
    value: 5
  - key: cata-text-style.EscapeUnicode
    value: 0
  - key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
    value: true
  - key: readability-uppercase-literal-suffix.NewSuffixes
    value: 'L;UL;LL;ULL'

# vim:tw=0
