-
Notifications
You must be signed in to change notification settings - Fork 23
/
LinterCop.ruleset.json
286 lines (286 loc) · 8.88 KB
/
LinterCop.ruleset.json
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
{
"name": "LinterCopRuleset",
"description": "These are the default rules of the linter cop. You can use this file as a template to start from",
"rules": [
{
"id": "LC0001",
"action": "Warning",
"justification": "FlowFields should not be editable."
},
{
"id": "LC0002",
"action": "Warning",
"justification": "Commit() needs a comment to justify its existence. Either a leading or a trailing comment."
},
{
"id": "LC0003",
"action": "Warning",
"justification": "Do not use an Object ID for properties or variable declarations."
},
{
"id": "LC0004",
"action": "Warning",
"justification": "DrillDownPageId and LookupPageId must be filled in table when table is used in list page."
},
{
"id": "LC0005",
"action": "Warning",
"justification": "The casing of variable/method usage must align with the definition."
},
{
"id": "LC0006",
"action": "Error",
"justification": "Fields with property AutoIncrement cannot be used in temporary table (TableType = Temporary)."
},
{
"id": "LC0007",
"action": "Hidden",
"justification": "Every table needs to specify a value for the DataPerCompany property. Either true or false."
},
{
"id": "LC0008",
"action": "Warning",
"justification": "Filter operators should not be used in SetRange"
},
{
"id": "LC0009",
"action": "Hidden",
"justification": "Show info message about code metrics for each function or trigger."
},
{
"id": "LC0010",
"action": "Warning",
"justification": "Show warning about code metrics for each function or trigger if either cyclomatic complexity is 8 or greater or maintainability index 20 or lower."
},
{
"id": "LC0011",
"action": "Hidden",
"justification": "Every object needs to specify a value for the Access property. Either true or false. Optionally this can also be activated for table fields with the setting enableRule0011ForTableFields."
},
{
"id": "LC0012",
"action": "Warning",
"justification": "Using hardcoded IDs in functions like Codeunit.Run() is not allowed."
},
{
"id": "LC0013",
"action": "Warning",
"justification": "Any table with a single field in the PK of type code or text, should have set NotBlank on the PK field."
},
{
"id": "LC0014",
"action": "Warning",
"justification": "The Caption of permissionset objects should not exceed the maximum length."
},
{
"id": "LC0015",
"action": "Warning",
"justification": "All application objects should be covered by at least one permission set in the extension."
},
{
"id": "LC0016",
"action": "Warning",
"justification": "Caption is missing. Optionally this can also be activated for fields on API objects with the setting enableRule0016ForApiObjects"
},
{
"id": "LC0017",
"action": "Warning",
"justification": "Writing to a FlowField is not common. Add a comment to explain this."
},
{
"id": "LC0018",
"action": "Info",
"justification": "Events in internal codeunits are not accessible to extensions and should therefore be avoided."
},
{
"id": "LC0019",
"action": "Info",
"justification": "If Data Classification is set on the Table. Fields do not need the same classification."
},
{
"id": "LC0020",
"action": "Info",
"justification": "If Application Area is set on the TablePage. Controls do not need the same classification."
},
{
"id": "LC0021",
"action": "Info",
"justification": "Confirm() must be implemented through the Confirm Management codeunit from the System Application."
},
{
"id": "LC0022",
"action": "Info",
"justification": "GlobalLanguage() must be implemented through the Translation Helper codeunit from the Base Application."
},
{
"id": "LC0023",
"action": "Info",
"justification": "Always provide fieldsgroups DropDown and Brick on tables."
},
{
"id": "LC0024",
"action": "Info",
"justification": "Procedure or Trigger declaration should not end with semicolon."
},
{
"id": "LC0025",
"action": "Info",
"justification": "Procedure must be either local, internal or define a documentation comment."
},
{
"id": "LC0026",
"action": "Info",
"justification": "ToolTip must end with a dot."
},
{
"id": "LC0027",
"action": "Info",
"justification": "Utilize the Page Management codeunit for launching page."
},
{
"id": "LC0028",
"action": "Info",
"justification": "Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier."
},
{
"id": "LC0029",
"action": "Info",
"justification": "Use CompareDateTime method in Type Helper codeunit for DateTime variable comparisons."
},
{
"id": "LC0030",
"action": "Info",
"justification": "Set Access property to Internal for Install/Upgrade codeunits."
},
{
"id": "LC0031",
"action": "Info",
"justification": "Set ReadIsolation property instead of LockTable method."
},
{
"id": "LC0032",
"action": "Warning",
"justification": "Clear(All) does not affect or change values for global variables in single instance codeunits."
},
{
"id": "LC0033",
"action": "Info",
"justification": "The specified runtime version in app.json is falling behind."
},
{
"id": "LC0034",
"action": "Hidden",
"justification": "The property Extensible should be explicitly set for public objects."
},
{
"id": "LC0035",
"action": "Info",
"justification": "Explicitly set AllowInCustomizations for fields omitted on pages."
},
{
"id": "LC0036",
"action": "Info",
"justification": "ToolTip must start with the verb Specifies."
},
{
"id": "LC0037",
"action": "Info",
"justification": "Do not use line breaks in ToolTip."
},
{
"id": "LC0038",
"action": "Info",
"justification": "Try to not exceed 200 characters (including spaces)."
},
{
"id": "LC0039",
"action": "Warning",
"justification": "The given argument has a different type from the one expected."
},
{
"id": "LC0040",
"action": "Info",
"justification": "Explicitly set the RunTrigger parameter on build-in methods."
},
{
"id": "LC0041",
"action": "Info",
"justification": "Empty Captions should be Locked."
},
{
"id": "LC0042",
"action": "Warning",
"justification": "AutoCalcFields should only be used for FlowFields or Blob fields."
},
{
"id": "LC0043",
"action": "Info",
"justification": "Use SecretText type to protect credentials and sensitive textual values from being revealed."
},
{
"id": "LC0044",
"action": "Warning",
"justification": "Tables coupled with TransferFields must have matching fields."
},
{
"id": "LC0045",
"action": "Info",
"justification": "Zero (0) Enum value should be reserved for Empty Value."
},
{
"id": "LC0046",
"action": "Info",
"justification": "Label with suffix Tok must be locked."
},
{
"id": "LC0047",
"action": "None",
"justification": "Locked Label must have a suffix Tok."
},
{
"id": "LC0048",
"action": "Info",
"justification": "Use Error with a ErrorInfo or Label variable to improve telemetry details."
},
{
"id": "LC0049",
"action": "Info",
"justification": "SourceTable property not defined on Page."
},
{
"id": "LC0050",
"action": "Info",
"justification": "SetFilter with unsupported operator in filter expression."
},
{
"id": "LC0051",
"action": "Warning",
"justification": "Do not assign a text to a target with smaller size."
},
{
"id": "LC0052",
"action": "Info",
"justification": "The internal procedure is declared but never used."
},
{
"id": "LC0053",
"action": "Info",
"justification": "The internal procedure is only used in the object in which it is declared. Consider making the procedure local."
},
{
"id": "LC0055",
"action": "Info",
"justification": "The suffix 'Tok' is meant to be used when the value of the label matches the name."
},
{
"id": "LC0056",
"action": "Info",
"justification": "Empty Enum values should not have a specified Caption property."
},
{
"id": "LC0057",
"action": "Info",
"justification": "Enum values must have non-empty a Caption to be selectable in the client."
}
]
}