curl/.clang-tidy.yml
Viktor Szakats 7c01bb23bc
rtspd: fix to check realloc() result
Also enable `bugprone-suspicious-realloc-usage` clang-tidy option
to verify.

Fixing:
```
tests/server/rtspd.c:328:37: error: 'req->rtp_buffer' may be set to null if 'realloc' fails,
 which may result in a leak of the original buffer
 [bugprone-suspicious-realloc-usage,-warnings-as-errors]
  328 |                   req->rtp_buffer = realloc(req->rtp_buffer,
      |                   ~~~~~~~~~~~~~~~   ^       ~~~~~~~~~~~~~~~
```

Ref: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/suspicious-realloc-usage.html

Closes #20621
2026-02-19 12:38:49 +01:00

17 lines
654 B
YAML

# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
---
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
# -clang-analyzer-security.insecureAPI.bzero: for FD_ZERO() (seen on macOS)
# -clang-analyzer-security.ArrayBound: due to false positives with clang-tidy v21.1.0
Checks: >-
-clang-analyzer-security.insecureAPI.bzero,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.ArrayBound,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-clang-diagnostic-nullability-extension,
bugprone-suspicious-realloc-usage,
misc-const-correctness,
portability-*