xref: /aosp_15_r20/external/vixl/.clang-tidy (revision f5c631da2f1efdd72b5fd1e20510e4042af13d77)
1*f5c631daSSadaf Ebrahimi---
2*f5c631daSSadaf Ebrahimi# We use the clang-tidy defaults and the Google styles as a baseline, with a
3*f5c631daSSadaf Ebrahimi# few changes specific to VIXL:
4*f5c631daSSadaf Ebrahimi#   -clang-analyzer-security.insecureAPI.rand:
5*f5c631daSSadaf Ebrahimi#       This warns against the use of mrand48 (etc) and suggests replacing them
6*f5c631daSSadaf Ebrahimi#       with arc4random. However, we are using these to drive tests and debug
7*f5c631daSSadaf Ebrahimi#       tools, and we need the ability to manually seed the generator. This is
8*f5c631daSSadaf Ebrahimi#       not possible with arc4random, and we do not need particularly robust
9*f5c631daSSadaf Ebrahimi#       random numbers, so we continue to use mrand48.
10*f5c631daSSadaf Ebrahimi#   -google-readability-todo:
11*f5c631daSSadaf Ebrahimi#       We don't put names on TODOs.
12*f5c631daSSadaf Ebrahimi#   -google-readability-function-size:
13*f5c631daSSadaf Ebrahimi#       There are cases where we need (or generate) very long functions,
14*f5c631daSSadaf Ebrahimi#       particularly involving macro-generated encoding tables and so on.
15*f5c631daSSadaf Ebrahimi#   -google-build-using-namespace:
16*f5c631daSSadaf Ebrahimi#       We do this in internal contexts (typically in .cc files), but clang-tidy
17*f5c631daSSadaf Ebrahimi#       cannot tell the difference.
18*f5c631daSSadaf Ebrahimi#   -google-explicit-constructor:
19*f5c631daSSadaf Ebrahimi#       We follow this rule, but have some exceptions that are annotated using
20*f5c631daSSadaf Ebrahimi#       cpplint's NOLINT format.
21*f5c631daSSadaf Ebrahimi#
22*f5c631daSSadaf Ebrahimi# TODO: The following _should_ be enabled, but currently show several failures:
23*f5c631daSSadaf Ebrahimi#   google-readability-braces-around-statements
24*f5c631daSSadaf Ebrahimi#   google-readability-namespace-comments
25*f5c631daSSadaf Ebrahimi#   google-readability-casting
26*f5c631daSSadaf Ebrahimi#
27*f5c631daSSadaf Ebrahimi# TODO: Also consider enabling other rules, such as bugprone-* and cert-*.
28*f5c631daSSadaf EbrahimiChecks:          '-clang-analyzer-security.insecureAPI.rand,google-*,-google-readability-todo,-google-readability-function-size,-google-build-using-namespace,-google-explicit-constructor,-google-readability-braces-around-statements,-google-readability-namespace-comments,-google-readability-casting'
29*f5c631daSSadaf EbrahimiHeaderFilterRegex: '\.h$'
30*f5c631daSSadaf EbrahimiAnalyzeTemporaryDtors: false
31*f5c631daSSadaf Ebrahimi...
32*f5c631daSSadaf Ebrahimi
33