blob: 16fff7885e12c6e8bb69b78f013475ad0468b88d [file] [log] [blame]
Alexander Hansen5ae48152023-09-28 20:05:11 +02001Checks: '
2 -*,
3 readability-function-size,
4 readability-function-cognitive-complexity
5'
6CheckOptions:
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.