Skip to content

Commit

Permalink
test: add test files
Browse files Browse the repository at this point in the history
  • Loading branch information
lljbash committed Jan 2, 2025
1 parent 4ed6950 commit b2ab6a4
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
Language: Cpp
BasedOnStyle: Google
BreakAfterAttributes: Leave
CommentPragmas: '^ (IWYU pragma:|NOLINT(BEGIN|END|NEXTLINE)?(\(.+\))?:? )'
DerivePointerAlignment: false
InsertNewlineAtEOF: true
87 changes: 87 additions & 0 deletions test/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
Checks: '
bugprone-*,
-bugprone-easily-swappable-parameters,
clang-analyzer-*,
clang-diagnostic-*,
cppcoreguidelines-*,
google-*,
-google-*googletest*,
hicpp-avoid-goto,
hicpp-exception-baseclass,
misc-header-include-cycle,
misc-static-assert,
misc-unused-alias-decls,
misc-unused-using-decls,
modernize-*,
performance-*,
readability-*,
-readability-qualified-auto,
-readability-static-accessed-through-instance'
# AnalyzeTemporaryDtors: false
FormatStyle: file
HeaderFilterRegex: '.*'
CheckOptions:
- key: cppcoreguidelines-avoid-do-while.IgnoreMacros
value: true
- key: cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes
value: 'size_t;ptrdiff_t;size_type;difference_type'
- key: readability-function-cognitive-complexity.IgnoreMacros
value: true
- key: readability-identifier-length.MinimumVariableNameLength
value: 2
- key: readability-identifier-length.MinimumParameterNameLength
value: 2
# --- Google's naming convention BEGIN ---
# modified part is marked as comment
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: k
- key: readability-identifier-naming.FunctionCase
# value: CamelCase
value: lower_case
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.StaticConstantCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantPrefix
value: k
- key: readability-identifier-naming.StaticVariableCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.MacroDefinitionIgnoredRegexp
value: '^[A-Z]+(_[A-Z]+)*_$'
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.PublicMemberSuffix
value: ''
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
# --- Google's naming convention END ---
...
4 changes: 4 additions & 0 deletions test/a.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class AA {
public:
public:
};
2 changes: 2 additions & 0 deletions test/b.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int
main() { int a; int b; c=1 }
Empty file added test/c.cpp
Empty file.

0 comments on commit b2ab6a4

Please sign in to comment.