Alexander Hansen | 5ae4815 | 2023-09-28 20:05:11 +0200 | [diff] [blame] | 1 | Checks: ' |
| 2 | -*, |
| 3 | readability-function-size, |
| 4 | readability-function-cognitive-complexity |
| 5 | ' |
| 6 | CheckOptions: |
| 7 | - { key: readability-function-size.LineThreshold, value: 60 } # [1] |
| 8 | - { key: readability-function-size.ParameterThreshold, value: 6 } # [2] |
| 9 | - { key: readability-function-cognitive-complexity.Threshold, value: 25 } # [3] |
| 10 | |
| 11 | # [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple |
| 12 | # [2] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f2-a-function-should-perform-a-single-logical-operation |
| 13 | # [3] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple |
| 14 | # However cognitive complexity != cyclomatic complexity. Therefore using the clang-tidy default value, |
| 15 | # as cyclomatic complexity seems to not be implemented in clang-tidy. |
| 16 | |
| 17 | # [1],[2],[3] do not have to be enforced or applied project-wide yet. |