Patrick Williams | 04408ef | 2025-05-23 16:06:04 -0400 | [diff] [blame] | 1 | Checks: '-*, |
Lei YU | 90629cc | 2025-02-06 06:04:33 +0000 | [diff] [blame] | 2 | bugprone-unchecked-optional-access, |
Jayanth Othayoth | 12cf111 | 2025-03-21 10:28:31 -0500 | [diff] [blame] | 3 | modernize-use-nullptr, |
Alexander Hansen | 5ae4815 | 2023-09-28 20:05:11 +0200 | [diff] [blame] | 4 | readability-function-size, |
| 5 | readability-function-cognitive-complexity |
Patrick Williams | 04408ef | 2025-05-23 16:06:04 -0400 | [diff] [blame] | 6 | ' |
| 7 | |
Alexander Hansen | 5ae4815 | 2023-09-28 20:05:11 +0200 | [diff] [blame] | 8 | CheckOptions: |
Patrick Williams | 04408ef | 2025-05-23 16:06:04 -0400 | [diff] [blame] | 9 | - key: readability-function-size.LineThreshold |
| 10 | value: 60 # [1] |
| 11 | - key: readability-function-size.ParameterThreshold |
| 12 | value: 6 # [2] |
| 13 | - key: readability-function-cognitive-complexity.Threshold |
| 14 | value: 25 # [3] |
| 15 | |
| 16 | HeaderFilterRegex: '(?!^subprojects).*' |
Alexander Hansen | 5ae4815 | 2023-09-28 20:05:11 +0200 | [diff] [blame] | 17 | |
Patrick Williams | e6185cf | 2025-02-07 11:06:53 -0500 | [diff] [blame] | 18 | WarningsAsErrors: '*' |
Patrick Williams | e6185cf | 2025-02-07 11:06:53 -0500 | [diff] [blame] | 19 | |
Alexander Hansen | 5ae4815 | 2023-09-28 20:05:11 +0200 | [diff] [blame] | 20 | # [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple |
| 21 | # [2] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f2-a-function-should-perform-a-single-logical-operation |
| 22 | # [3] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f3-keep-functions-short-and-simple |
| 23 | # However cognitive complexity != cyclomatic complexity. Therefore using the clang-tidy default value, |
| 24 | # as cyclomatic complexity seems to not be implemented in clang-tidy. |
| 25 | |
| 26 | # [1],[2],[3] do not have to be enforced or applied project-wide yet. |