mirror of
https://github.com/curl/curl.git
synced 2026-04-14 11:41:45 +03:00
- enable three checks: - bugprone-invalid-enum-default-initialization - bugprone-sizeof-expression - readability-inconsistent-declaration-parameter-name (strict) - fix remaining discrepancies with arg names in prototypes and implementation, in strict mode. - document reason for some checks tested but not enabled. Closes #20794
59 lines
2.5 KiB
YAML
59 lines
2.5 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-*
|
|
- -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-assignment-in-if-condition
|
|
- bugprone-chained-comparison
|
|
- bugprone-dynamic-static-initializers
|
|
- bugprone-invalid-enum-default-initialization
|
|
- 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-sizeof-expression
|
|
- bugprone-suspicious-enum-usage
|
|
- bugprone-suspicious-memset-usage
|
|
- bugprone-suspicious-missing-comma
|
|
- bugprone-suspicious-realloc-usage
|
|
- bugprone-suspicious-semicolon
|
|
# bugprone-unchecked-string-to-number-conversion # needs converting sscanf to strtol or curlx_str_*
|
|
- misc-const-correctness
|
|
- misc-header-include-cycle
|
|
# misc-redundant-expression # undesired hits due to system macros, e.g. due to POLLIN == POLLRDNORM | POLLRDBAND, then or-ing all three
|
|
- portability-*
|
|
- readability-duplicate-include
|
|
# readability-else-after-return
|
|
# readability-enum-initial-value
|
|
# readability-function-cognitive-complexity
|
|
- readability-inconsistent-declaration-parameter-name
|
|
# readability-misleading-indentation # too many false positives and oddball/conditional source
|
|
- readability-named-parameter
|
|
# readability-redundant-casting # false positives in types that change from platform to platform, even with IgnoreTypeAliases: true
|
|
- readability-redundant-control-flow
|
|
- readability-redundant-declaration
|
|
- readability-redundant-function-ptr-dereference
|
|
- readability-redundant-parentheses
|
|
- readability-redundant-preprocessor
|
|
- readability-suspicious-call-argument
|
|
- readability-uppercase-literal-suffix
|
|
|
|
CheckOptions:
|
|
misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h'
|
|
readability-inconsistent-declaration-parameter-name.Strict: true
|
|
|
|
HeaderFilterRegex: '.*' # Default in v22.1.0+
|