Files
dumb-kevin 661b45d89c Vendor plf_colony/plf_list verbatim under src/third-party/plf/
- Add upstream plf_colony v5.10 and plf_list v1.60 verbatim
- Add upstream zLib LICENSE
- Replace src/colony.h with thin cata::colony alias wrapper
- Replace src/list.h with thin cata::list alias wrapper
- Drop colony|list path from .clang-tidy header exclude regex
- Suppress Win32 test-exe abort dialog via _set_abort_behavior
2026-05-18 21:56:09 +04:00

155 lines
7.4 KiB
YAML

# 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.
Checks: [
bugprone-*,
# This check is too time consuming. Disable it for now to save CI time.
-bugprone-throw-keyword-missing,
cata-*,
cert-*,
# * 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-dcl21-cpp,
# * cert-env33-c (calls to system, popen)
# Unlikely to catch bugs, and using system is convenient for portability.
-cert-env33-c,
# * cert-dcl37-c and cert-dcl-51-cpp (reserved identifiers)
# These two checks are aliases for bugprone-reserved-identifier.
# Don't repeatedly run the same check for three times.
-cert-dcl37-c,
-cert-dcl51-cpp,
# * cert-err58-cpp (exceptions from static variable declarations)
# We have lots of memory allocations in static variable declarations, and
# that's fine.
-cert-err58-cpp,
# * clang-analyzer-core.{DivideZero,NonNullParamChecker,UndefinedBinaryOperatorResult}
# * clang-analyzer-cplusplus.NewDelete
# They report too many false positives.
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-core.DivideZero,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-core.UndefinedBinaryOperatorResult,
-clang-analyzer-cplusplus.InnerPointer,
-clang-analyzer-cplusplus.NewDelete,
# We often use enums as bitsets and do things like `enum::A | enum::B`
# which is explicitly unsupported by this check, and it is officially recommended to disable
# this lint for project that use such patterns.
-clang-analyzer-optin.core.EnumCastOutOfRange,
clang-diagnostic-*,
cppcoreguidelines-slicing,
google-explicit-constructor,
llvm-namespace-comment,
misc-*,
# Extremely expensive, and we are not using `using` anyway, so it's not catching anything.
-misc-unused-using-decls,
modernize-*,
# Rather expensive check, and it is unlikely that somebody
# would *want* to use std::auto_ptr in %CURRENT_YEAR% (2025+) when unique_ptr is both better
# and is a de-facto default in the codebase already.
-modernize-replace-auto-ptr,
# * modernize-use-auto
# We prefer an almost-always-avoid-auto style.
-modernize-use-auto,
# * modernize-use-trailing-return-type
# An arbitrary style convention we haven't adopted.
-modernize-use-trailing-return-type,
performance-*,
readability-*,
# * readability-identifier-naming
# We are not enforcing a standard identifier naming scheme in the code base.
# This check does not bring much value at the moment and consumes a lot of CPU time.
-readability-identifier-length,
-readability-identifier-naming,
# disabled due to behaviour change between pre-module and post-module world.
# Reevaluate in 2027(?) when the code is sufficiently migrated to C++20 modules
# or when there is a decision not perform the migration
-readability-redundant-inline-specifier,
# ==== Untriaged checks follow ====
# Either fix the code and re-enable the check,
# or add a good comment and move to the appropriate section above.
# Silencing the existing errors with a //NOLINT does count as a "fix", as that still
# prevents new issues from cropping up.
-bugprone-assignment-in-if-condition,
-bugprone-easily-swappable-parameters,
-bugprone-empty-catch,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-narrowing-conversions,
-bugprone-switch-missing-default-case,
-bugprone-unchecked-optional-access,
-bugprone-unhandled-exception-at-new,
-bugprone-unused-local-non-trivial-variable, # great lint, but hard to fix
-misc-confusable-identifiers,
-misc-const-correctness,
-misc-header-include-cycle,
-misc-include-cleaner,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
-modernize-concat-nested-namespaces,
-modernize-macro-to-enum,
-modernize-pass-by-value,
-modernize-return-braced-init-list,
-modernize-use-default-member-init,
-modernize-use-nodiscard,
-performance-avoid-endl,
-performance-enum-size, # untriaged since upgrade to LLVM 18
-performance-noexcept-swap,
-performance-no-automatic-move,
-readability-avoid-nested-conditional-operator, # great lint, but hard to fix
-readability-avoid-unconditional-preprocessor-if,
-readability-container-data-pointer,
-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-redundant-casting, # probably good lint, just needs fixing
-readability-simplify-boolean-expr,
-readability-suspicious-call-argument,
-readability-use-anyofallof,
# ==== Disabled noise from checks introduced in LLVM 19+ ====
# clang-tidy silently ignores unknown check names, so entries here only
# take effect on toolchains that already ship the corresponding check.
-bugprone-crtp-constructor-accessibility, # CRTP base ctors are public on purpose
-modernize-avoid-c-arrays, # false-positive inside std::enable_if_t<>
-readability-math-missing-parentheses, # would add parens around almost every existing binary op
-readability-use-std-min-max, # if/else clamp idiom is preferred to std::min/max here
# ==== Disabled noise from checks introduced in LLVM 21+ ====
-readability-enum-initial-value, # 13 enums mix explicit and defaulted values; mechanical sweep deferred
-cert-int09-c, # alias of readability-enum-initial-value
-readability-use-concise-preprocessor-directives,
# ==== Disabled noise from checks introduced in LLVM 22+ ====
-bugprone-derived-method-shadowing-base-method, # store/load/kcal_range are intentional; wield audit pending
-bugprone-std-namespace-modification, # std::hash<UserType> specializations are legal
-bugprone-throwing-static-initialization, # every static const xxx_id ID(...) trips it
-misc-multiple-inheritance, # Character: Creature, visitable is intentional
-misc-override-with-different-visibility, # can_resume_with_internal access change is intentional
-modernize-avoid-c-style-cast, # codebase uses C-style casts widely
-readability-container-size-empty, # auto-fix !empty() differs from size()==N inside Catch2 macros
]
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