Skip to content

Commit f5ea005

Browse files
committed
Initial commit
0 parents  commit f5ea005

11 files changed

+928
-0
lines changed

.clang-format

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: LLVM
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveMacros: true
7+
AlignConsecutiveAssignments: false
8+
AlignConsecutiveDeclarations: false
9+
AlignEscapedNewlines: Right
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllArgumentsOnNextLine: true
13+
AllowAllConstructorInitializersOnNextLine: true
14+
AllowAllParametersOfDeclarationOnNextLine: true
15+
AllowShortBlocksOnASingleLine: Never
16+
AllowShortCaseLabelsOnASingleLine: false
17+
AllowShortEnumsOnASingleLine: false
18+
AllowShortFunctionsOnASingleLine: None
19+
AllowShortLambdasOnASingleLine: All
20+
AllowShortIfStatementsOnASingleLine: Never
21+
AllowShortLoopsOnASingleLine: false
22+
AlwaysBreakAfterDefinitionReturnType: None
23+
AlwaysBreakAfterReturnType: None
24+
AlwaysBreakBeforeMultilineStrings: false
25+
AlwaysBreakTemplateDeclarations: MultiLine
26+
BinPackArguments: true
27+
BinPackParameters: true
28+
BraceWrapping:
29+
AfterCaseLabel: false
30+
AfterClass: false
31+
AfterControlStatement: false
32+
AfterEnum: false
33+
AfterFunction: false
34+
AfterNamespace: false
35+
AfterObjCDeclaration: false
36+
AfterStruct: false
37+
AfterUnion: false
38+
AfterExternBlock: false
39+
BeforeCatch: false
40+
BeforeElse: false
41+
IndentBraces: false
42+
SplitEmptyFunction: true
43+
SplitEmptyRecord: true
44+
SplitEmptyNamespace: true
45+
BreakBeforeBinaryOperators: None
46+
BreakBeforeBraces: Attach
47+
BreakBeforeInheritanceComma: false
48+
BreakInheritanceList: BeforeColon
49+
BreakBeforeTernaryOperators: true
50+
BreakConstructorInitializersBeforeComma: false
51+
BreakConstructorInitializers: AfterColon
52+
BreakAfterJavaFieldAnnotations: false
53+
BreakStringLiterals: true
54+
ColumnLimit: 120
55+
CommentPragmas: '^ IWYU pragma:'
56+
CompactNamespaces: false
57+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
58+
ConstructorInitializerIndentWidth: 4
59+
ContinuationIndentWidth: 4
60+
Cpp11BracedListStyle: true
61+
DeriveLineEnding: true
62+
DerivePointerAlignment: false
63+
DisableFormat: false
64+
ExperimentalAutoDetectBinPacking: false
65+
FixNamespaceComments: true
66+
ForEachMacros:
67+
- foreach
68+
- Q_FOREACH
69+
- BOOST_FOREACH
70+
IncludeBlocks: Preserve
71+
IncludeCategories:
72+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
73+
Priority: 2
74+
SortPriority: 0
75+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
76+
Priority: 3
77+
SortPriority: 0
78+
- Regex: '.*'
79+
Priority: 1
80+
SortPriority: 0
81+
IncludeIsMainRegex: '(Test)?$'
82+
IncludeIsMainSourceRegex: ''
83+
IndentCaseLabels: false
84+
IndentGotoLabels: true
85+
IndentPPDirectives: None
86+
IndentWidth: 4
87+
IndentWrappedFunctionNames: false
88+
JavaScriptQuotes: Leave
89+
JavaScriptWrapImports: true
90+
KeepEmptyLinesAtTheStartOfBlocks: true
91+
MacroBlockBegin: ''
92+
MacroBlockEnd: ''
93+
MaxEmptyLinesToKeep: 1
94+
NamespaceIndentation: None
95+
ObjCBinPackProtocolList: Auto
96+
ObjCBlockIndentWidth: 2
97+
ObjCSpaceAfterProperty: false
98+
ObjCSpaceBeforeProtocolList: true
99+
PenaltyBreakAssignment: 2
100+
PenaltyBreakBeforeFirstCallParameter: 19
101+
PenaltyBreakComment: 300
102+
PenaltyBreakFirstLessLess: 120
103+
PenaltyBreakString: 1000
104+
PenaltyBreakTemplateDeclaration: 10
105+
PenaltyExcessCharacter: 1000000
106+
PenaltyReturnTypeOnItsOwnLine: 60
107+
PointerAlignment: Left
108+
ReflowComments: true
109+
SortIncludes: true
110+
SortUsingDeclarations: true
111+
SpaceAfterCStyleCast: false
112+
SpaceAfterLogicalNot: false
113+
SpaceAfterTemplateKeyword: true
114+
SpaceBeforeAssignmentOperators: true
115+
SpaceBeforeCpp11BracedList: false
116+
SpaceBeforeCtorInitializerColon: true
117+
SpaceBeforeInheritanceColon: true
118+
SpaceBeforeParens: ControlStatements
119+
SpaceBeforeRangeBasedForLoopColon: true
120+
SpaceInEmptyBlock: false
121+
SpaceInEmptyParentheses: false
122+
SpacesBeforeTrailingComments: 1
123+
SpacesInAngles: false
124+
SpacesInConditionalStatement: false
125+
SpacesInContainerLiterals: true
126+
SpacesInCStyleCastParentheses: false
127+
SpacesInParentheses: false
128+
SpacesInSquareBrackets: false
129+
SpaceBeforeSquareBrackets: false
130+
Standard: Latest
131+
StatementMacros:
132+
- Q_UNUSED
133+
- QT_REQUIRE_VERSION
134+
TabWidth: 8
135+
UseCRLF: false
136+
UseTab: Never
137+
...
138+

.eslintrc.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es2021": true
6+
},
7+
"extends": [
8+
"airbnb-base"
9+
],
10+
"parserOptions": {
11+
"ecmaVersion": 12
12+
},
13+
"rules": {
14+
"camelcase": "off",
15+
"eqeqeq": [
16+
"error",
17+
"smart"
18+
],
19+
"comma-dangle": [
20+
"warn",
21+
{
22+
"objects": "always-multiline",
23+
"arrays": "always-multiline",
24+
"functions": "never"
25+
}
26+
],
27+
"import/no-unresolved": [
28+
2,
29+
{
30+
"ignore": [
31+
"everestjs"
32+
]
33+
}
34+
],
35+
"max-len": [
36+
"warn",
37+
{
38+
"code": 120,
39+
"tabWidth": 2
40+
}
41+
]
42+
}
43+
}

CMakeLists.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(grpc-extended-cpp-plugin
4+
DESCRIPTION "gRPC extended C++ code generator"
5+
LANGUAGES CXX C
6+
)
7+
8+
find_package(everest-cmake 0.4
9+
REQUIRED
10+
PATHS ../everest-cmake
11+
)
12+
13+
evc_setup_edm()
14+
15+
add_executable(grpc_extended_cpp_plugin
16+
extended_cpp_plugin.cc
17+
extended_cpp_generator.cc
18+
)
19+
target_include_directories(grpc_extended_cpp_plugin
20+
PRIVATE
21+
${CMAKE_CURRENT_SOURCE_DIR}
22+
${grpc_SOURCE_DIR}
23+
)
24+
target_link_libraries(grpc_extended_cpp_plugin
25+
grpc_plugin_support
26+
)
27+
28+
install(TARGETS grpc_extended_cpp_plugin)

0 commit comments

Comments
 (0)