[PATCH] D108265: .clang-tidy: Push variable related readability-identifier-naming options down to projects
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 17 19:15:41 PDT 2021
MaskRay created this revision.
MaskRay added reviewers: dblaikie, mehdi_amini.
MaskRay requested review of this revision.
Herald added subscribers: cfe-commits, llvm-commits, aheejin.
Herald added projects: LLVM, clang-tools-extra.
The variable related top-level readability-identifier-naming options
don't apply to many projects.
{llvm,clang,clang-tools-extra} use `VariableName` but most
other top-level projects use `variableName` or disable
readability-identifier-naming. It makes more sense to push down the
related options to llvm and clang-tools-extra.
Note: clang/ has explicitly disabled readability-identifier-naming.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108265
Files:
.clang-tidy
clang-tools-extra/.clang-tidy
llvm/.clang-tidy
Index: llvm/.clang-tidy
===================================================================
--- llvm/.clang-tidy
+++ llvm/.clang-tidy
@@ -1 +1,19 @@
+Checks: 'readability-identifier-naming'
InheritParentConfig: true
+CheckOptions:
+ - 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: CamelCase
+ - key: readability-identifier-naming.ParameterCase
+ value: CamelCase
+ - key: readability-identifier-naming.UnionCase
+ value: CamelCase
+ - key: readability-identifier-naming.VariableCase
+ value: CamelCase
+ - key: readability-identifier-naming.IgnoreMainLikeFunctions
+ value: 1
Index: clang-tools-extra/.clang-tidy
===================================================================
--- clang-tools-extra/.clang-tidy
+++ clang-tools-extra/.clang-tidy
@@ -1,4 +1,5 @@
-Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-misc-no-recursion,readability-identifier-naming'
+Checks: 'readability-identifier-naming'
+InheritParentConfig: true
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
@@ -16,4 +17,3 @@
value: CamelCase
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
-
Index: .clang-tidy
===================================================================
--- .clang-tidy
+++ .clang-tidy
@@ -6,14 +6,8 @@
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- - key: readability-identifier-naming.MemberCase
- value: CamelCase
- - key: readability-identifier-naming.ParameterCase
- value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- - key: readability-identifier-naming.VariableCase
- value: CamelCase
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108265.367091.patch
Type: text/x-patch
Size: 2435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210818/7a99004a/attachment.bin>
More information about the cfe-commits
mailing list