Anthony Barbier | 89eefef | 2019-07-05 11:15:13 +0100 | [diff] [blame] | 1 | --- |
Jacob Bramley | 5523f6c | 2019-06-28 11:37:26 +0100 | [diff] [blame] | 2 | # We use the clang-tidy defaults and the Google styles as a baseline, with a |
| 3 | # few changes specific to VIXL: |
Jacob Bramley | 32ceac2 | 2019-10-02 15:40:23 +0100 | [diff] [blame] | 4 | # -clang-analyzer-security.insecureAPI.rand: |
| 5 | # This warns against the use of mrand48 (etc) and suggests replacing them |
| 6 | # with arc4random. However, we are using these to drive tests and debug |
| 7 | # tools, and we need the ability to manually seed the generator. This is |
Jacob Bramley | 13cb52c | 2019-10-03 11:11:22 +0100 | [diff] [blame] | 8 | # not possible with arc4random, and we do not need particularly robust |
| 9 | # random numbers, so we continue to use mrand48. |
Jacob Bramley | 5523f6c | 2019-06-28 11:37:26 +0100 | [diff] [blame] | 10 | # -google-readability-todo: |
| 11 | # We don't put names on TODOs. |
| 12 | # -google-readability-function-size: |
| 13 | # There are cases where we need (or generate) very long functions, |
| 14 | # particularly involving macro-generated encoding tables and so on. |
| 15 | # -google-build-using-namespace: |
| 16 | # We do this in internal contexts (typically in .cc files), but clang-tidy |
| 17 | # cannot tell the difference. |
| 18 | # -google-explicit-constructor: |
| 19 | # We follow this rule, but have some exceptions that are annotated using |
| 20 | # cpplint's NOLINT format. |
| 21 | # |
| 22 | # TODO: The following _should_ be enabled, but currently show several failures: |
| 23 | # google-readability-braces-around-statements |
| 24 | # google-readability-namespace-comments |
| 25 | # google-readability-casting |
| 26 | # |
| 27 | # TODO: Also consider enabling other rules, such as bugprone-* and cert-*. |
Jacob Bramley | 32ceac2 | 2019-10-02 15:40:23 +0100 | [diff] [blame] | 28 | Checks: '-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' |
Jacob Bramley | 5523f6c | 2019-06-28 11:37:26 +0100 | [diff] [blame] | 29 | HeaderFilterRegex: '\.h$' |
Anthony Barbier | 89eefef | 2019-07-05 11:15:13 +0100 | [diff] [blame] | 30 | AnalyzeTemporaryDtors: false |
| 31 | CheckOptions: |
| 32 | ... |
| 33 | |