|
| 1 | +# Reasoning |
| 2 | +# ========= |
| 3 | +# |
| 4 | +# Selection of Checks |
| 5 | +# ------------------ |
| 6 | +# |
| 7 | +# Selecting the following general purpose checks relevant for C code: |
| 8 | +# - clang-analyzer-* () |
| 9 | +# - bugprone-* |
| 10 | +# - readability-* |
| 11 | +# - misc-* |
| 12 | +# |
| 13 | +# Additional checks for other languages or specific to projects/coding standards |
| 14 | +# are not used, expected for the Linux kernel coding conventions, as the RIOT |
| 15 | +# coding conventions builds upon the Linux coding conventions. |
| 16 | +# |
| 17 | +# Finally, the following checks are disabled: |
| 18 | +# - bugprone-reserved-identifier: |
| 19 | +# Too many false positives, as check does not take `static` declaration |
| 20 | +# into account |
| 21 | +# - bugprone-easily-swappable-parameters: |
| 22 | +# This cannot be avoided |
| 23 | +# - bugprone-too-small-loop-variable: |
| 24 | +# Too many false positives |
| 25 | +# |
| 26 | +# |
| 27 | +# Which Warnings to Raise to Errors |
| 28 | +# --------------------------------- |
| 29 | +# |
| 30 | +# - bugprone-*: |
| 31 | +# Avoiding known pitfalls or explicitly adding a magic comment and a |
| 32 | +# reasoning for why sticking with a footgun should be doable |
| 33 | +# - portability-*: |
| 34 | +# Porability issues bite us hard due to the wide varity of board, |
| 35 | +# toolchains, standard C libs, etc. we use. So we should avoid them |
| 36 | +# where possible |
| 37 | +# |
| 38 | +# |
| 39 | +# Fine Tuning |
| 40 | +# ----------- |
| 41 | +# |
| 42 | +# - readability-function-cognitive-complexity.IgnoreMacros: 'true': |
| 43 | +# Otherwise the use of `DEBUG()...` will be penalized, even though it |
| 44 | +# helps both in debugging and to document the code. |
| 45 | +# |
| 46 | +# Warning |
| 47 | +# ------- |
| 48 | +# |
| 49 | +# This configuration file is rather new and may enable a few warnings with a |
| 50 | +# low signal-to-noise ratio are may not enable checks that would be exteremely |
| 51 | +# helpful. If you modify this file to improve your experience, please consider |
| 52 | +# upstreaming the changes. |
| 53 | +--- |
| 54 | +Checks: "clang-analyzer-*, |
| 55 | + bugprone-*, |
| 56 | + portability-*, |
| 57 | + readability-*, |
| 58 | + misc-*, |
| 59 | + linuxkernel-*, |
| 60 | + -bugprone-reserved-identifier, |
| 61 | + -bugprone-easily-swappable-parameters, |
| 62 | + " |
| 63 | +WarningsAsErrors: "bugprone-*, |
| 64 | + portability-*, |
| 65 | + " |
| 66 | +HeaderFilterRegex: '' |
| 67 | +FormatStyle: file |
| 68 | +CheckOptions: |
| 69 | + readability-function-cognitive-complexity.IgnoreMacros: 'true' |
0 commit comments