ddnet/.clang-tidy
def f3796e5455 Disable or fix some spammy new clang-tidy 13 warnings
src/engine/client/backend/opengles/opengles_sl_program.cpp:10:11: warning: suspicious #include of file with '.cpp' extension [bugprone-suspicious-include]
          ^

src/engine/graphics.h:330:67: warning: 2 adjacent parameters of 'CFreeformItem' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters]
                CFreeformItem(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) :
                                                                                ^~~~~~~~~~~~~~~~~~

src/game/editor/layer_tiles.cpp:1802:14: warning: result of multiplication in type 'int' is used as a pointer offset after an implicit widening conversion to type 'ptrdiff_t' [bugprone-implicit-widening-of-multiplication-result]
                        mem_zero(&m_pSwitchTile[y * m_Width], o * sizeof(CSwitchTile));
                                  ^

src/game/server/entities/plasma.cpp💯152: warning: operator has equivalent nested operands [misc-redundant-expression]
        if(SnapPlayer && SnapPlayer->GetTeam() != TEAM_SPECTATORS && !SnapPlayer->IsPaused() && SnapChar && SnapChar && SnapChar->Team() != m_ResponsibleTeam && SnapPlayer->m_ShowOthers != 1)
                                                                                                ~~~~~~~~    ~~~~~~~~                                          ^

src/game/editor/editor.cpp:4295:38: warning: The right operand of '>' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
                        if(m_FilePreviewImageInfo.m_Width > Preview.w)
                                                          ^ ~~~~~~~~~
2022-01-22 13:35:52 +01:00

43 lines
1.4 KiB
YAML

# Why we disabled individual checks:
#
# clang-analyzer-optin.cplusplus.UninitializedObject
# TODO: Occurs commonly in graphics_threaded.h
# clang-analyzer-optin.cplusplus.VirtualCall
# Occurs very commonly all over
# clang-analyzer-optin.performance.Padding
# Too annoying to always align for perfect padding
# clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
# TODO: Requires C11 to fix
# misc-unused-parameters
# TODO: Many changes
Checks: >
-*,
bugprone-*,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-incorrect-roundings,
-bugprone-integer-division,
-bugprone-macro-parentheses,
-bugprone-narrowing-conversions,
-bugprone-parent-virtual-call,
-bugprone-reserved-identifier,
-bugprone-suspicious-include,
-bugprone-unhandled-self-assignment,
clang-analyzer-*,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
misc-*,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-static-assert,
-misc-unused-parameters,
modernize-loop-convert,
readability-qualified-auto,
performance-*,
-performance-no-int-to-ptr,
HeaderFilterRegex: 'src/.*'