2017-09-30 14:54:58 +03:00
|
|
|
---
|
|
|
|
target: obj-x86_64-pc-linux-gnu
|
2019-03-26 13:04:58 +03:00
|
|
|
# It is used by 'mach static-analysis' and 'phabricator static-analysis bot'
|
2017-09-30 14:54:58 +03:00
|
|
|
# in order to have consistency across the used checkers.
|
|
|
|
# All the clang checks used by the static-analysis tools.
|
2018-10-03 18:53:31 +03:00
|
|
|
#
|
|
|
|
# To add a new checker:
|
|
|
|
# 1. Add it in this file
|
|
|
|
# 2. Create a C/C++ test case in tools/clang-tidy/test/ reproducing the
|
|
|
|
# warning/error that the checker will detect
|
|
|
|
# 3. Run './mach static-analysis autotest -d' to create the reference
|
|
|
|
# 4. Check the json file in tools/clang-tidy/test/
|
|
|
|
# 5. Commit this file + the .cpp test case + the json result
|
2018-05-03 20:06:16 +03:00
|
|
|
platforms:
|
|
|
|
- linux64
|
2018-09-04 14:55:19 +03:00
|
|
|
- macosx64
|
2018-05-03 20:06:16 +03:00
|
|
|
- win32
|
2018-09-04 14:55:19 +03:00
|
|
|
- win64
|
2018-09-25 10:51:39 +03:00
|
|
|
# Minimum clang-tidy version that is required for all the following checkers
|
|
|
|
# to work properly.
|
2019-04-11 12:58:59 +03:00
|
|
|
package_version: "8.0.0"
|
2017-09-30 14:54:58 +03:00
|
|
|
clang_checkers:
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: -*
|
|
|
|
publish: !!bool no
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-argument-comment
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-assert-side-effect
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-bool-pointer-implicit-conversion
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-forward-declaration-namespace
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-incorrect-roundings
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-integer-division
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-macro-parentheses
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-macro-repeated-side-effects
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-misplaced-widening-cast
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2019-05-14 10:12:37 +03:00
|
|
|
- name: bugprone-move-forwarding-reference
|
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-multiple-statement-macro
|
2018-10-04 15:14:11 +03:00
|
|
|
# Incompatible with our code base, see bug 1496379.
|
|
|
|
publish: !!bool no
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-sizeof-expression
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-string-constructor
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-string-integer-assignment
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-07-09 09:54:13 +03:00
|
|
|
- name: bugprone-suspicious-memset-usage
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-suspicious-missing-comma
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-suspicious-semicolon
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-suspicious-string-compare
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-swapped-arguments
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2019-05-22 17:55:45 +03:00
|
|
|
- name: bugprone-too-small-loop-variable
|
|
|
|
reliability: high
|
2018-08-24 15:39:58 +03:00
|
|
|
- name: bugprone-unused-raii
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: bugprone-use-after-move
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: clang-analyzer-core.CallAndMessage
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: clang-analyzer-core.DivideZero
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: clang-analyzer-core.NonNullParamChecker
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: clang-analyzer-core.NullDereference
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: clang-analyzer-core.UndefinedBinaryOperatorResult
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: clang-analyzer-core.uninitialized.Assign
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: clang-analyzer-core.uninitialized.Branch
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-07-15 09:07:40 +03:00
|
|
|
- name: clang-analyzer-cplusplus.NewDelete
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-07-15 09:10:39 +03:00
|
|
|
- name: clang-analyzer-cplusplus.NewDeleteLeaks
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: clang-analyzer-deadcode.DeadStores
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: clang-analyzer-security.FloatLoopCounter
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.bcmp
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.bcopy
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.bzero
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.getpw
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-06-19 08:08:00 +03:00
|
|
|
# We don't add clang-analyzer-security.insecureAPI.gets here; it's deprecated.
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.mkstemp
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.mktemp
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.rand
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2019-03-26 13:04:58 +03:00
|
|
|
# C checker, that is outdated and doesn't check for the new std::rand calls.
|
2018-05-03 20:06:16 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: clang-analyzer-security.insecureAPI.strcpy
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2019-03-26 13:04:58 +03:00
|
|
|
# The functions that should be used differ on POSIX and Windows, and there
|
|
|
|
# isn't a consensus on how we should approach this.
|
2018-05-03 20:06:16 +03:00
|
|
|
publish: !!bool no
|
2018-06-19 08:06:00 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.UncheckedReturn
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: clang-analyzer-security.insecureAPI.vfork
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-07-15 09:28:26 +03:00
|
|
|
- name: clang-analyzer-unix.Malloc
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-07-15 09:15:37 +03:00
|
|
|
- name: clang-analyzer-unix.cstring.BadSizeArg
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-07-15 08:07:12 +03:00
|
|
|
- name: clang-analyzer-unix.cstring.NullArg
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2019-05-22 17:55:45 +03:00
|
|
|
- name: cppcoreguidelines-narrowing-conversions
|
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: misc-non-copyable-objects
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: misc-redundant-expression
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2018-07-09 21:04:31 +03:00
|
|
|
- name: misc-unused-alias-decls
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: misc-unused-using-decls
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-avoid-bind
|
|
|
|
restricted-platforms:
|
|
|
|
- win32
|
|
|
|
- win64
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: medium
|
2019-05-22 17:55:45 +03:00
|
|
|
- name: modernize-deprecated-ios-base-aliases
|
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-loop-convert
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-raw-string-literal
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-redundant-void-arg
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2019-03-26 13:04:58 +03:00
|
|
|
# We still have some old C code that is built with a C compiler, so this
|
|
|
|
# might break the build.
|
2018-05-03 20:06:16 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: modernize-shrink-to-fit
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-06-19 08:06:00 +03:00
|
|
|
- name: modernize-use-auto
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-06-19 08:06:00 +03:00
|
|
|
# Controversial, see bug 1371052.
|
|
|
|
publish: !!bool no
|
|
|
|
- name: modernize-use-bool-literals
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-use-equals-default
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-use-equals-delete
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-use-nullptr
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: modernize-use-override
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-05-03 20:06:16 +03:00
|
|
|
# Too noisy because of the way how we implement NS_IMETHOD. See Bug 1420366.
|
|
|
|
publish: !!bool no
|
|
|
|
- name: mozilla-*
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-06-19 08:08:00 +03:00
|
|
|
- name: performance-faster-string-find
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: performance-for-range-copy
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: performance-implicit-conversion-in-loop
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: performance-inefficient-algorithm
|
|
|
|
restricted-platforms:
|
|
|
|
- linux64
|
|
|
|
- macosx64
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: performance-inefficient-string-concatenation
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: performance-inefficient-vector-operation
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: performance-move-const-arg
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: performance-move-constructor-init
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: performance-noexcept-move-constructor
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: performance-type-promotion-in-math-fn
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: performance-unnecessary-copy-initialization
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: performance-unnecessary-value-param
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-05 17:07:58 +03:00
|
|
|
- name: readability-braces-around-statements
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2019-05-22 17:55:45 +03:00
|
|
|
- name: readability-const-return-type
|
|
|
|
reliability: high
|
2018-09-05 17:07:58 +03:00
|
|
|
# Note: this can be loosened up by using the ShortStatementLines option
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-container-size-empty
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: readability-delete-null-pointer
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-else-after-return
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-03 19:30:29 +03:00
|
|
|
- name: readability-implicit-bool-conversion
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-10-30 20:11:55 +03:00
|
|
|
# On automation the config flags act strange. Please see Bug 1500241.
|
|
|
|
publish: !!bool no
|
2018-10-10 11:01:24 +03:00
|
|
|
config:
|
|
|
|
- key: AllowIntegerConditions
|
|
|
|
# The check will allow conditional integer conversions.
|
|
|
|
value: 1
|
|
|
|
- key: AllowPointerConditions
|
|
|
|
# The check will allow conditional pointer conversions.
|
|
|
|
value: 1
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: readability-inconsistent-declaration-parameter-name
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2019-05-22 17:55:45 +03:00
|
|
|
- name: readability-isolate-declaration
|
2019-06-13 15:32:57 +03:00
|
|
|
# As per bug 1558987 - we don't want to have this enabled
|
|
|
|
publish: !!bool no
|
2019-05-22 17:55:45 +03:00
|
|
|
reliability: high
|
|
|
|
- name: readability-magic-numbers
|
|
|
|
# Bug 1553495 - we must see first its impact on our code.
|
|
|
|
publish: !!bool no
|
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-misleading-indentation
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: readability-non-const-parameter
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-redundant-control-flow
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2019-04-02 09:07:39 +03:00
|
|
|
- name: readability-redundant-preprocessor
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-redundant-smartptr-get
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-redundant-string-cstr
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-redundant-string-init
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-04 14:55:19 +03:00
|
|
|
- name: readability-static-accessed-through-instance
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-10-02 17:10:32 +03:00
|
|
|
- name: readability-simplify-boolean-expr
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-05-03 20:06:16 +03:00
|
|
|
- name: readability-uniqueptr-delete-release
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: high
|
2018-09-20 18:29:32 +03:00
|
|
|
# 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
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-build-namespaces
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-build-using-namespace
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-default-arguments
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-explicit-constructor
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-global-names-in-headers
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-readability-casting
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-readability-function-size
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-readability-namespace-comments
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-readability-todo
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-runtime-int
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-runtime-operator
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
|
|
|
- name: google-runtime-references
|
2019-04-18 11:49:52 +03:00
|
|
|
reliability: low
|
2018-09-20 18:29:32 +03:00
|
|
|
publish: !!bool no
|
2017-09-30 14:54:58 +03:00
|
|
|
|
|
|
|
# Third party files from mozilla-central
|
|
|
|
third_party: tools/rewriting/ThirdPartyPaths.txt
|