加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.clang-tidy 3.05 KB
一键复制 编辑 原始数据 按行查看 历史
minggo 提交于 2021-01-12 16:35 . fix coding style (#3167)
# Here is an explanation for why some of the checks are disabled:
#
# -modernize-use-trailing-return-type, -fuchsia-trailing-return: return a function call
# at the end of a function is normal usage.
#
# -readability-implicit-bool-conversion, -readability-implicit-bool-cast: if (_usage & BufferUsageBit::VERTEX)
# is normal usage
#
# -cppcoreguidelines-pro-type-vararg: use it in macro define, such as Log functions. May use
# template instead in future.
#
# -cppcoreguidelines-pro-type-static-cast-downcast: sub class of gfx device should use static_cast<xxx>() to
# cast to derived class.
#
# -readability-function-cognitive-complexity: it will limit function size.
#
# -cppcoreguidelines-pro-bounds-pointer-arithmetic, cppcoreguidelines-pro-bounds-array-to-pointer-decay:
# JS pass data by pointer, so it is common to use pointer arithmetic.
#
Checks: >
-*,
readability-*,
performance-*,
modernize-*,
misc-*,
portability-*,
cppcoreguidelines-*,
google-explicit-constructor,
-modernize-use-trailing-return-type,
-fuchsia-trailing-return,
-readability-implicit-bool-conversion,
-readability-implicit-bool-cast,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-pro-type-static-cast-downcast,
-readability-function-cognitive-complexity,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay
CheckOptions:
################## readability identifier naming ################################
# class
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
value: camelBack
- key: readability-identifier-naming.ClassMemberPrefix
value: _
- key: readability-identifier-naming.ClassMethodCase
value: camelBack
- key: readability-identifier-naming.ClassConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ClassConstantCasePrefix
value: _
# enum
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.ScopedEnumConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
# others
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.ConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.LocalConstantCase
value: camelBack
- key: readability-identifier-naming.LocalVariableCase
value: camelBack
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.ParameterCase
value: camelBack
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.VariableCase
value: camelBack
- key: readability-identifier-naming.StructCase
value: CamelBack
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化