blob: c566465e71821632c9ce27d5fd4de9d1886a864d [file] [log] [blame]
Alexander Hansen5ae48152023-09-28 20:05:11 +02001Checks: '
2 -*,
Lei YU90629cc2025-02-06 06:04:33 +00003 bugprone-unchecked-optional-access,
Alexander Hansen5ae48152023-09-28 20:05:11 +02004 readability-function-size,
5 readability-function-cognitive-complexity
6'
7CheckOptions:
8 - { key: readability-function-size.LineThreshold, value: 60 } # [1]
9 - { key: readability-function-size.ParameterThreshold, value: 6 } # [2]
10 - { key: readability-function-cognitive-complexity.Threshold, value: 25 } # [3]
11
12# [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple
13# [2] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f2-a-function-should-perform-a-single-logical-operation
14# [3] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple
15# However cognitive complexity != cyclomatic complexity. Therefore using the clang-tidy default value,
16# as cyclomatic complexity seems to not be implemented in clang-tidy.
17
18# [1],[2],[3] do not have to be enforced or applied project-wide yet.