curl/.clang-tidy.yml
Viktor Szakats 3137f725cd
cmake: fix passing system header directories to clang-tidy for tests
Pass system directories with `-isystem` to avoid clang-tidy parsing
3rd-party and system headers with `HeaderFilterRegex: '.*' enabled.

Also:
- drop rule exception no longer necessary.
- sync normal vs. system header path order with compiler invocation.
- tidy up `set()` syntax.
- clear a temporary variable.

Bug: https://github.com/curl/curl/pull/20670#issuecomment-3940840176
Follow-up to e088e10454 #17705
Cherry-picked from: #20720

Closes #20724
2026-02-25 22:29:26 +01:00

44 lines
1.6 KiB
YAML

# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
---
# https://clang.llvm.org/extra/clang-tidy/
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
Checks:
- -clang-analyzer-optin.performance.Padding
- -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy v21.1.0
- -clang-analyzer-security.insecureAPI.bzero # for FD_ZERO() (seen on macOS)
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
- -clang-diagnostic-nullability-extension
- bugprone-assert-side-effect
- bugprone-chained-comparison
- bugprone-dynamic-static-initializers
- bugprone-macro-parentheses
- bugprone-macro-repeated-side-effects
- bugprone-misplaced-operator-in-strlen-in-alloc
- bugprone-misplaced-pointer-arithmetic-in-alloc
- bugprone-not-null-terminated-result
- bugprone-posix-return
- bugprone-redundant-branch-condition
- bugprone-signed-char-misuse
- bugprone-suspicious-enum-usage
- bugprone-suspicious-memset-usage
- bugprone-suspicious-missing-comma
- bugprone-suspicious-realloc-usage
- bugprone-suspicious-semicolon
- misc-const-correctness
- misc-header-include-cycle
- portability-*
- readability-duplicate-include
- readability-math-missing-parentheses
- readability-named-parameter
- readability-redundant-control-flow
- readability-redundant-declaration
- readability-redundant-function-ptr-dereference
- readability-redundant-parentheses
- readability-redundant-preprocessor
- readability-uppercase-literal-suffix
CheckOptions:
misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h'