gecko-dev/tools/clang-tidy/config.yaml

129 строки
4.7 KiB
YAML
Исходник Обычный вид История

---
target: obj-x86_64-pc-linux-gnu
# It is used by 'mach static-analysis' and 'mozreview static-analysis bot'
# in order to have consistency across the used checkers.
# All the clang checks used by the static-analysis tools.
platforms:
- linux64
- macosx64
- win32
- win64
# Minimum clang-tidy version that is required for all the following checkers
# to work properly.
min_clang_tidy: "7.0.0"
clang_checkers:
- name: -*
publish: !!bool no
- name: bugprone-argument-comment
- name: bugprone-assert-side-effect
- name: bugprone-bool-pointer-implicit-conversion
- name: bugprone-forward-declaration-namespace
- name: bugprone-macro-repeated-side-effects
- name: bugprone-string-constructor
- name: bugprone-string-integer-assignment
- name: bugprone-suspicious-memset-usage
- name: bugprone-suspicious-missing-comma
- name: bugprone-suspicious-semicolon
- name: bugprone-swapped-arguments
- name: bugprone-unused-raii
- name: clang-analyzer-cplusplus.NewDelete
- name: clang-analyzer-cplusplus.NewDeleteLeaks
- name: clang-analyzer-deadcode.DeadStores
- name: clang-analyzer-security.FloatLoopCounter
- name: clang-analyzer-security.insecureAPI.bcmp
- name: clang-analyzer-security.insecureAPI.bcopy
- name: clang-analyzer-security.insecureAPI.bzero
- name: clang-analyzer-security.insecureAPI.getpw
# We don't add clang-analyzer-security.insecureAPI.gets here; it's deprecated.
- name: clang-analyzer-security.insecureAPI.mkstemp
- name: clang-analyzer-security.insecureAPI.mktemp
- name: clang-analyzer-security.insecureAPI.rand
publish: !!bool no
- name: clang-analyzer-security.insecureAPI.strcpy
publish: !!bool no
- name: clang-analyzer-security.insecureAPI.UncheckedReturn
- name: clang-analyzer-security.insecureAPI.vfork
- name: clang-analyzer-unix.Malloc
- name: clang-analyzer-unix.cstring.BadSizeArg
- name: clang-analyzer-unix.cstring.NullArg
- name: misc-unused-alias-decls
- name: misc-unused-using-decls
- name: modernize-avoid-bind
restricted-platforms:
- win32
- win64
- name: modernize-loop-convert
- name: modernize-raw-string-literal
- name: modernize-redundant-void-arg
publish: !!bool no
- name: modernize-shrink-to-fit
- name: modernize-use-auto
# Controversial, see bug 1371052.
publish: !!bool no
- name: modernize-use-bool-literals
- name: modernize-use-equals-default
- name: modernize-use-equals-delete
- name: modernize-use-nullptr
- name: modernize-use-override
# Too noisy because of the way how we implement NS_IMETHOD. See Bug 1420366.
publish: !!bool no
- name: mozilla-*
- name: performance-faster-string-find
- name: performance-for-range-copy
- name: performance-implicit-conversion-in-loop
- name: performance-inefficient-algorithm
restricted-platforms:
- linux64
- macosx64
- name: performance-inefficient-string-concatenation
- name: performance-inefficient-vector-operation
- name: performance-move-const-arg
- name: performance-move-constructor-init
- name: performance-noexcept-move-constructor
- name: performance-type-promotion-in-math-fn
- name: performance-unnecessary-copy-initialization
- name: performance-unnecessary-value-param
- name: readability-braces-around-statements
# Note: this can be loosened up by using the ShortStatementLines option
- name: readability-container-size-empty
- name: readability-else-after-return
- name: readability-misleading-indentation
- name: readability-redundant-control-flow
- name: readability-redundant-smartptr-get
publish: !!bool no
- name: readability-redundant-string-cstr
- name: readability-redundant-string-init
- name: readability-static-accessed-through-instance
- name: readability-uniqueptr-delete-release
# We don't publish the google checkers since we are interested in only having
# a general idea how our code complies with the rules added by these checkers.
- name: google-build-explicit-make-pair
publish: !!bool no
- name: google-build-namespaces
publish: !!bool no
- name: google-build-using-namespace
publish: !!bool no
- name: google-default-arguments
publish: !!bool no
- name: google-explicit-constructor
publish: !!bool no
- name: google-global-names-in-headers
publish: !!bool no
- name: google-readability-casting
publish: !!bool no
- name: google-readability-function-size
publish: !!bool no
- name: google-readability-namespace-comments
publish: !!bool no
- name: google-readability-todo
publish: !!bool no
- name: google-runtime-int
publish: !!bool no
- name: google-runtime-operator
publish: !!bool no
- name: google-runtime-references
publish: !!bool no
# Third party files from mozilla-central
third_party: tools/rewriting/ThirdPartyPaths.txt