-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align Codebase with Google C++ Style and Modern Practices (#22)
- Loading branch information
1 parent
1ac4ac2
commit ae48a4e
Showing
59 changed files
with
1,275 additions
and
1,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 'id' is common in JSON-RPC, so we disable the identifier length check. | ||
# Magic numbers are acceptable here since we use a calculator as the main example. | ||
Checks: > | ||
-*, | ||
google-*, | ||
modernize-*, | ||
readability-*, | ||
cppcoreguidelines-*, | ||
clang-analyzer-*, | ||
-readability-identifier-length, | ||
-readability-magic-numbers, | ||
-cppcoreguidelines-avoid-magic-numbers, | ||
CheckOptions: | ||
# Google's naming conventions. | ||
# See: https://gist.github.com/airglow923/1fa3bda42f2b193920d7f46ee8345e04 | ||
- 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 | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
- main | ||
|
||
jobs: | ||
format-check: | ||
clang-format-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -18,6 +18,8 @@ jobs: | |
|
||
- name: Run clang-format | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: 18 | ||
|
||
build-and-test-cmake: | ||
runs-on: ubuntu-latest | ||
|
@@ -47,6 +49,7 @@ jobs: | |
run: | | ||
conan profile detect --force | ||
conan install . --build=missing | ||
conan install . -s build_type=Debug --build=missing | ||
- name: Configure CMake and build project | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
filegroup( | ||
name = "clang_tidy_config", | ||
srcs = [".clang-tidy"], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.