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

129 строки
4.2 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:
- macosx64
- linux64
- win64
- win32
clang_checkers:
- name: -*
publish: !!bool no
- name: clang-analyzer-cplusplus.NewDelete
publish: !!bool yes
- name: clang-analyzer-cplusplus.NewDeleteLeaks
publish: !!bool yes
- name: clang-analyzer-deadcode.DeadStores
publish: !!bool yes
- name: clang-analyzer-security.FloatLoopCounter
publish: !!bool yes
- name: clang-analyzer-security.insecureAPI.getpw
publish: !!bool yes
# We don't add clang-analyzer-security.insecureAPI.gets here; it's deprecated.
- name: clang-analyzer-security.insecureAPI.mkstemp
publish: !!bool yes
- name: clang-analyzer-security.insecureAPI.mktemp
publish: !!bool yes
- name: clang-analyzer-security.insecureAPI.rand
publish: !!bool no
- name: clang-analyzer-security.insecureAPI.strcpy
publish: !!bool no
- name: clang-analyzer-security.insecureAPI.UncheckedReturn
publish: !!bool yes
- name: clang-analyzer-security.insecureAPI.vfork
publish: !!bool yes
- name: misc-argument-comment
publish: !!bool yes
- name: misc-assert-side-effect
publish: !!bool yes
- name: misc-bool-pointer-implicit-conversion
publish: !!bool yes
- name: misc-forward-declaration-namespace
# Name with clang tidy 6.0. We are currently using 5.0
# - name: bugprone-forward-declaration-namespace
publish: !!bool yes
Bug 1475882 - clang-tidy: Enable misc-macro-repeated-side-effects check. r=andi This check finds side effects from repeated macro arguments: https://clang.llvm.org/extra/clang-tidy/checks/bugprone-macro-repeated-side-effects.html There are currently 16 misc-macro-repeated-side-effects warnings in mozilla-central, but they are all in third-party gfx/cairo code: gfx/cairo/cairo/src/cairo-tor-scan-converter.c:1432:10: warning: side effects in the 1st macro argument 'x' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1011:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1037:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1062:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1088:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1107:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1126:27: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1194:21: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:1258:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:600:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:629:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:660:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:690:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:721:28: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-access.c:986:16: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion gfx/cairo/libpixman/src/pixman-edge-imp.h:126:20: warning: side effects in the 2nd macro argument 'ptr' are repeated in macro expansion MozReview-Commit-ID: CQ6iO9JO773 --HG-- extra : rebase_source : 0e7dc6fa3990ab187c597d8042a403c554152b02 extra : source : 5f47d400d53107df0e0478b369745bfd3f055702
2018-07-09 20:14:40 +03:00
- name: misc-macro-repeated-side-effects
publish: !!bool yes
- name: misc-suspicious-missing-comma
publish: !!bool yes
- name: misc-suspicious-semicolon
publish: !!bool yes
- name: misc-swapped-arguments
publish: !!bool yes
- name: misc-unused-alias-decls
publish: !!bool yes
- name: misc-unused-raii
publish: !!bool yes
- name: misc-unused-using-decls
publish: !!bool yes
- name: modernize-avoid-bind
publish: !!bool yes
restricted-platforms:
- win32
- win64
- name: modernize-loop-convert
publish: !!bool yes
- name: modernize-raw-string-literal
publish: !!bool yes
- name: modernize-redundant-void-arg
publish: !!bool no
- name: modernize-shrink-to-fit
publish: !!bool yes
- name: modernize-use-auto
# Controversial, see bug 1371052.
publish: !!bool no
- name: modernize-use-bool-literals
publish: !!bool yes
- name: modernize-use-equals-default
publish: !!bool yes
- name: modernize-use-equals-delete
publish: !!bool yes
- name: modernize-use-nullptr
publish: !!bool yes
- name: modernize-use-override
# Too noisy because of the way how we implement NS_IMETHOD. See Bug 1420366.
publish: !!bool no
- name: mozilla-*
publish: !!bool yes
- name: performance-faster-string-find
publish: !!bool yes
- name: performance-for-range-copy
publish: !!bool yes
# Only available from clang tidy 6.0. We are currently using 5.0
# - name: performance-implicit-conversion-in-loop
# publish: !!bool yes
- name: performance-inefficient-string-concatenation
publish: !!bool yes
- name: performance-inefficient-vector-operation
publish: !!bool yes
- name: performance-type-promotion-in-math-fn
publish: !!bool yes
- name: performance-unnecessary-copy-initialization
publish: !!bool yes
- name: performance-unnecessary-value-param
publish: !!bool yes
- name: readability-container-size-empty
publish: !!bool yes
- name: readability-else-after-return
publish: !!bool yes
- name: readability-misleading-indentation
publish: !!bool yes
- name: readability-redundant-control-flow
publish: !!bool yes
- name: readability-redundant-smartptr-get
publish: !!bool no
- name: readability-redundant-string-cstr
publish: !!bool yes
- name: readability-redundant-string-init
publish: !!bool yes
- name: readability-uniqueptr-delete-release
publish: !!bool yes
# Only available from clang tidy 6.0. We are currently using 5.0
# - name: readability-static-accessed-through-instance
# publish: !!bool yes
# Third party files from mozilla-central
third_party: tools/rewriting/ThirdPartyPaths.txt