diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-10-20 19:48:22 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-10-20 19:48:22 +0800 |
| commit | 0dbee5806b28a598409be4649e4a9207200bacbf (patch) | |
| tree | c4f1a7dcd9efa35c96c68e9c7ec284afe2f5fa8f /.clang-tidy | |
| parent | 3e8d7d1270ace353cce0080a80021dcc7532f2be (diff) | |
| download | rcc-project-0dbee5806b28a598409be4649e4a9207200bacbf.tar.gz rcc-project-0dbee5806b28a598409be4649e4a9207200bacbf.tar.xz | |
[Dev] Configure build presets and code checks
Diffstat (limited to '.clang-tidy')
| -rw-r--r-- | .clang-tidy | 101 |
1 files changed, 72 insertions, 29 deletions
diff --git a/.clang-tidy b/.clang-tidy index 36043cd..ba38270 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,3 +1,4 @@ +HeaderFilterRegex: '(^|/)(rcc|cfront)/(include|lib|tools)/' Checks: > -*, clang-diagnostic-*, @@ -9,34 +10,76 @@ Checks: > -misc-non-private-member-variables-in-classes, -misc-unused-parameters, -misc-use-anonymous-namespace, - readability-identifier-naming + readability-identifier-naming, + bugprone-argument-comment, + bugprone-assert-side-effect, + bugprone-branch-clone, + bugprone-copy-constructor-init, + bugprone-dangling-handle, + bugprone-dynamic-static-initializers, + bugprone-macro-parentheses, + bugprone-macro-repeated-side-effects, + bugprone-misplaced-widening-cast, + bugprone-move-forwarding-reference, + bugprone-multiple-statement-macro, + bugprone-suspicious-semicolon, + bugprone-swapped-arguments, + bugprone-terminating-continue, + bugprone-unused-raii, + bugprone-unused-return-value, + misc-redundant-expression, + misc-static-assert, + misc-unused-using-decls, + modernize-use-bool-literals, + modernize-loop-convert, + modernize-make-unique, + modernize-raw-string-literal, + modernize-use-equals-default, + modernize-use-default-member-init, + modernize-use-emplace, + modernize-use-nullptr, + modernize-use-override, + modernize-use-using, + performance-for-range-copy, + performance-implicit-conversion-in-loop, + performance-inefficient-algorithm, + performance-inefficient-vector-operation, + performance-move-const-arg, + performance-no-automatic-move, + performance-trivially-destructible, + performance-unnecessary-copy-initialization, + performance-unnecessary-value-param, + readability-avoid-const-params-in-decls, + readability-const-return-type, + readability-container-size-empty, + readability-inconsistent-declaration-parameter-name, + readability-misleading-indentation, + readability-redundant-control-flow, + readability-redundant-smartptr-get, + readability-simplify-boolean-expr, + readability-simplify-subscript-expr, + readability-use-anyofallof CheckOptions: - # Type - - { key: readability-identifier-naming.NamespaceCase, value: lower_case } - - { key: readability-identifier-naming.ClassCase, value: CamelCase } - - { key: readability-identifier-naming.StructCase, value: CamelCase } - - { key: readability-identifier-naming.UnionCase, value: CamelCase } - - { key: readability-identifier-naming.EnumCase, value: CamelCase } - - { key: readability-identifier-naming.TypeAliasCase, value: CamelCase } - - { key: readability-identifier-naming.TypedefCase, value: CamelCase } - - { key: readability-identifier-naming.TypeTemplateParameterCase, value: CamelCase } - # Function - - { key: readability-identifier-naming.FunctionCase, value: camelBack } - - { key: readability-identifier-naming.MethodCase, value: camelBack } - # Variable - - { key: readability-identifier-naming.VariableCase, value: CamelCase } - - { key: readability-identifier-naming.ParameterCase, value: CamelCase } - - { key: readability-identifier-naming.MemberCase, value: CamelCase } - # Constant - - { key: readability-identifier-naming.GlobalConstantCase, value: CamelCase } - - { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase } - - { key: readability-identifier-naming.ClassConstantCase, value: CamelCase } - - { key: readability-identifier-naming.EnumConstantCase, value: CamelCase } - # Preserve canonical protocol, opcode, ABI, and ISA spellings. - - { key: readability-identifier-naming.EnumConstantIgnoredRegexp, value: '^([A-Z][A-Z0-9_]*|Pseudo[A-Z0-9_]+)$' } - - { key: readability-identifier-naming.MacroDefinitionCase, value: UPPER_CASE } - # Other - - { key: readability-identifier-naming.IgnoreMainLikeFunctions, value: 1 } - - { key: readability-redundant-member-init.IgnoreBaseInCopyConstructors, value: 1 } - - { key: modernize-use-default-member-init.UseAssignment, value: 1 } + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.EnumCase + value: CamelCase + - key: readability-identifier-naming.FunctionCase + value: camelBack + - key: readability-identifier-naming.MemberCase + value: camelBack + - key: readability-identifier-naming.ParameterCase + value: camelBack + - key: readability-identifier-naming.UnionCase + value: CamelCase + - key: readability-identifier-naming.VariableCase + value: camelBack + - key: readability-identifier-naming.IgnoreMainLikeFunctions + value: 1 + - key: readability-redundant-member-init.IgnoreBaseInCopyConstructors + value: 1 + - key: modernize-use-default-member-init.UseAssignment + value: 1 + - key: modernize-use-using.IgnoreExternC + value: true |
