xref: /openbmc/docs/style/cpp/.clang-tidy (revision 5ae481581052b996966ef4c3df18afb12b1fbda8)
1*5ae48158SAlexander HansenChecks: '
2*5ae48158SAlexander Hansen    -*,
3*5ae48158SAlexander Hansen    readability-function-size,
4*5ae48158SAlexander Hansen    readability-function-cognitive-complexity
5*5ae48158SAlexander Hansen'
6*5ae48158SAlexander HansenCheckOptions:
7*5ae48158SAlexander Hansen  - { key: readability-function-size.LineThreshold,             value: 60 } # [1]
8*5ae48158SAlexander Hansen  - { key: readability-function-size.ParameterThreshold,        value: 6 }  # [2]
9*5ae48158SAlexander Hansen  - { key: readability-function-cognitive-complexity.Threshold, value: 25 } # [3]
10*5ae48158SAlexander Hansen
11*5ae48158SAlexander Hansen# [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple
12*5ae48158SAlexander Hansen# [2] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f2-a-function-should-perform-a-single-logical-operation
13*5ae48158SAlexander Hansen# [3] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple
14*5ae48158SAlexander Hansen# However cognitive complexity != cyclomatic complexity. Therefore using the clang-tidy default value,
15*5ae48158SAlexander Hansen# as cyclomatic complexity seems to not be implemented in clang-tidy.
16*5ae48158SAlexander Hansen
17*5ae48158SAlexander Hansen# [1],[2],[3] do not have to be enforced or applied project-wide yet.
18