-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkbench.check-names.jsonc
186 lines (145 loc) · 5.11 KB
/
workbench.check-names.jsonc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{
"accepted_types": [
"angle",
"mat2f",
"mat3f",
"mat4f",
"quatf",
"rgb",
"rgba",
"rgbai",
"rgbi",
"size2f",
"size2i",
"unit2f",
"unit3f",
"vec2f",
"vec2i",
"vec3f",
"vec4f",
// sdl event
"SDL_Event",
// change to lowercase
"I64", "I32", "I16", "I8",
"U64", "U32", "U16", "U8"
],
"accepted_functions": [
// this is a macro that doxygen detects as a function
"DEFAULT_INTERPOLATE",
// not a verb function
"base_cast",
// math functions
"acos", "asin", "atan", "atan2", "cos", "max", "min",
"sin", "tan", "abs", "sqrt",
"dot", "cross",
// catch wrappers
"approx",
//stb "port"
"stb_adler32", "stb_lit"
],
"known_function_prefixes": [
"palette", "stb", "default", "locale",
],
// theese files follow existing conventiosna and are excluded from specific name rules
"ignored_files": [
"libs/core/src/core/easing.cc",
"libs/core/src/base/functional.h"
],
"bad_function_verbs": {
// for X prefer any of Y
"start": ["begin"],
"starts": ["begins_with"],
"calculate": ["calc"],
"new": ["create", "make"],
// https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/l/lay-out-laid-out-layout
"layout": ["lay_out"],
"blit": ["paste"],
"step": ["update"],
"work": ["update"],
},
"known_function_verbs": [
// This is not really a verb but all imgui widgets should have this prefix
// to signify they both render and interact with the event system.
// Neither add nor interact fit super well so until we can figure out
// a good verb, imgui it is
"imgui",
// converter functions
// todo(Gustav): reduce the number of convert functions
"c", "convert", "as", "con", "conv",
"from", "to",
"get", "set",
"add", "remove",
"create", "destroy",
"begin", "end",
"read", "write",
"encode", "decode",
// common math names
"floor", "ceil", "clamp", "lerp", "slerp", "blend", "filter", "join",
"lay", // _out
// bool functions
"is", "has", "contains", "can", "should", "have", "could", "match",
"begins", "ends", // _with
// actual event handler
"on",
// I will correct that error tomorrow
"correct",
// function to trigger and handle events
"react", // "_to"
// I'm going to remap this value from A to B
"remap",
// for eample: I will debug this tomorrow
"debug",
// increase, decrease a value
"decrease",
// compress or decompress
"decompress",
// calculate
"calc",
// quare this number
"square",
// hash this data pleasae
"hash",
// shuffle theese cards please
"shuffle",
// todo(Gustav): prefer another name? read? or parse?
"load", "save",
// todo(Gustav): come up with a better name
// this is too close to clear for my comfort
// suggestions: purify, cleanse, tidy
// invert function name, instead of clean say remove_x
"clean",
// todo(Gustav): prefer create? or should create always be matched with destroy
"make",
// todo(Gustav): add disable?
"enable",
// todo(Gustav): block one or both... use constructor?
"init", "setup",
// this should always be followed with a verb...
// todo(Gustav): move to a prefix even though this is a verb?
"try",
// vague verbs...
// todo(Gustav): replace or reduce with suggestions?
"apply", "use", "run", "build",
"determine", "change", "perform", "do",
// todo(Gustav): rename function to from_look...
"look",
// short for modify...
// todo(Gustav): just use modify?
"mod",
"transform", "transpose", "translate",
"raycast", "raytrace",
"allocate", "interpolate", "tokenize",
"wrap", "describe", "pan", "zoom", "include", "invert",
"define", "expect", "advance", "skip", "send", "accept",
"copy", "extract", "keep", "swap", "strip", "flip", "pop",
"capitalize", "construct", "post", "close", "undo",
"paste", "sort", "find", "parse", "draw", "print", "move",
"update", "offset", "register", "put", "extend", "fill", "split",
"toggle", "inset", "render", "count", "resolve", "show", "compile",
"list", "generate", "combine", "bind", "expand", "pack", "replace",
"select", "report", "clear", "center", "compare", "scale",
"peek", "collect", "tint", "log", "trim", "iterate", "dump", "focus",
"rotate", "normalize", "merge", "validate", "view",
"round", "flatten", "visit", "reserve", "flush", "activate",
]
}