@codacy/tools-unsupported-tools 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +111 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +261 -0
- package/dist/patterns/CodeNarc.json +4890 -0
- package/dist/patterns/Credo.json +1276 -0
- package/dist/patterns/PHPCS.json +10230 -0
- package/dist/patterns/SonarCSharp.json +4328 -0
- package/dist/patterns/SonarVisualBasic.json +1462 -0
- package/dist/patterns/TSQLLint.json +272 -0
- package/dist/patterns/ameba.json +686 -0
- package/dist/patterns/codacy-scalameta-pro.json +856 -0
- package/dist/patterns/coffeelint.json +479 -0
- package/dist/patterns/dartanalyzer.json +10400 -0
- package/dist/patterns/phpmd.json +573 -0
- package/dist/patterns/psscriptanalyzer.json +624 -0
- package/package.json +37 -0
|
@@ -0,0 +1,1276 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "Credo_consistency_exception_names",
|
|
4
|
+
"category": "CodeStyle",
|
|
5
|
+
"severityLevel": "Info",
|
|
6
|
+
"title": "Enforce Consistent Exception Names",
|
|
7
|
+
"enabled": true,
|
|
8
|
+
"languages": ["Elixir"],
|
|
9
|
+
"parameters": []
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "Credo_consistency_line_endings",
|
|
13
|
+
"category": "CodeStyle",
|
|
14
|
+
"severityLevel": "Info",
|
|
15
|
+
"title": "Enforce Consistent Line Endings",
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"languages": ["Elixir"],
|
|
18
|
+
"parameters": [
|
|
19
|
+
{
|
|
20
|
+
"name": "force",
|
|
21
|
+
"default": "null",
|
|
22
|
+
"description": "Force a choice, values can be `:unix` or `:windows`."
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "Credo_consistency_multi_alias_import_require_use",
|
|
28
|
+
"category": "CodeStyle",
|
|
29
|
+
"severityLevel": "Info",
|
|
30
|
+
"title": "Enforce Consistent Multi Alias Import Style",
|
|
31
|
+
"enabled": false,
|
|
32
|
+
"languages": ["Elixir"],
|
|
33
|
+
"parameters": []
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "Credo_consistency_parameter_pattern_matching",
|
|
37
|
+
"category": "CodeStyle",
|
|
38
|
+
"severityLevel": "Info",
|
|
39
|
+
"title": "Enforce Consistent Parameter Pattern Matching Style",
|
|
40
|
+
"enabled": true,
|
|
41
|
+
"languages": ["Elixir"],
|
|
42
|
+
"parameters": [
|
|
43
|
+
{
|
|
44
|
+
"name": "force",
|
|
45
|
+
"default": "null",
|
|
46
|
+
"description": "Force a choice, values can be `:after` or `:before`."
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "Credo_consistency_space_around_operators",
|
|
52
|
+
"category": "CodeStyle",
|
|
53
|
+
"severityLevel": "Info",
|
|
54
|
+
"title": "Enforce Consistent Spacing Around Operators",
|
|
55
|
+
"enabled": true,
|
|
56
|
+
"languages": ["Elixir"],
|
|
57
|
+
"parameters": [
|
|
58
|
+
{
|
|
59
|
+
"name": "ignore",
|
|
60
|
+
"default": "[\"|\"]",
|
|
61
|
+
"description": "List of operators to be ignored for this check."
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "Credo_consistency_space_in_parentheses",
|
|
67
|
+
"category": "CodeStyle",
|
|
68
|
+
"severityLevel": "Info",
|
|
69
|
+
"title": "Enforce Consistent Spacing in Parentheses",
|
|
70
|
+
"enabled": true,
|
|
71
|
+
"languages": ["Elixir"],
|
|
72
|
+
"parameters": [
|
|
73
|
+
{
|
|
74
|
+
"name": "allow_empty_enums",
|
|
75
|
+
"default": "false",
|
|
76
|
+
"description": "Allows [], %{} and similar empty enum values to be used regardless of spacing throughout the codebase."
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "Credo_consistency_tabs_or_spaces",
|
|
82
|
+
"category": "CodeStyle",
|
|
83
|
+
"severityLevel": "Info",
|
|
84
|
+
"title": "Enforce Consistent Use of Tabs or Spaces",
|
|
85
|
+
"enabled": true,
|
|
86
|
+
"languages": ["Elixir"],
|
|
87
|
+
"parameters": [
|
|
88
|
+
{
|
|
89
|
+
"name": "force",
|
|
90
|
+
"default": "null",
|
|
91
|
+
"description": "Force a choice, values can be `:spaces` or `:tabs`."
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "Credo_consistency_unused_variable_names",
|
|
97
|
+
"category": "CodeStyle",
|
|
98
|
+
"severityLevel": "Info",
|
|
99
|
+
"title": "Enforce Consistent Naming for Unused Variables",
|
|
100
|
+
"enabled": false,
|
|
101
|
+
"languages": ["Elixir"],
|
|
102
|
+
"parameters": [
|
|
103
|
+
{
|
|
104
|
+
"name": "force",
|
|
105
|
+
"default": "null",
|
|
106
|
+
"description": "Force a choice, values can be `:meaningful` or `:anonymous`."
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "Credo_design_alias_usage",
|
|
112
|
+
"category": "BestPractice",
|
|
113
|
+
"severityLevel": "Info",
|
|
114
|
+
"title": "Enforce Design Alias Usage",
|
|
115
|
+
"enabled": true,
|
|
116
|
+
"languages": ["Elixir"],
|
|
117
|
+
"parameters": [
|
|
118
|
+
{
|
|
119
|
+
"name": "excluded_lastnames",
|
|
120
|
+
"default": "[\"Access\",\"Agent\",\"Application\",\"Atom\",\"Base\",\"Behaviour\",\"Bitwise\",\"Code\",\"Date\",\"DateTime\",\"Dict\",\"Enum\",\"Exception\",\"File\",\"Float\",\"GenEvent\",\"GenServer\",\"HashDict\",\"HashSet\",\"Integer\",\"IO\",\"Kernel\",\"Keyword\",\"List\",\"Macro\",\"Map\",\"MapSet\",\"Module\",\"NaiveDateTime\",\"Node\",\"OptionParser\",\"Path\",\"Port\",\"Process\",\"Protocol\",\"Range\",\"Record\",\"Regex\",\"Registry\",\"Set\",\"Stream\",\"String\",\"StringIO\",\"Supervisor\",\"System\",\"Task\",\"Time\",\"Tuple\",\"URI\",\"Version\"]",
|
|
121
|
+
"description": "List of lastnames to be excluded for this check."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "excluded_namespaces",
|
|
125
|
+
"default": "[\"File\",\"IO\",\"Inspect\",\"Kernel\",\"Macro\",\"Supervisor\",\"Task\",\"Version\"]",
|
|
126
|
+
"description": "List of namespaces to be excluded for this check."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "if_called_more_often_than",
|
|
130
|
+
"default": "0",
|
|
131
|
+
"description": "Only raise an issue if a module is called more often than this."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "if_nested_deeper_than",
|
|
135
|
+
"default": "2",
|
|
136
|
+
"description": "Only raise an issue if a module is nested deeper than this."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "if_referenced",
|
|
140
|
+
"default": "false",
|
|
141
|
+
"description": "Raise an issue if a module is referenced by name, e.g. as an argument in a function call."
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "only",
|
|
145
|
+
"default": "null",
|
|
146
|
+
"description": "Regex or a list of regexes that specifies which modules to include for this check.\n\n`excluded_namespaces` and `excluded_lastnames` take precedence over this parameter.\n"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "Credo_design_duplicated_code",
|
|
152
|
+
"category": "BestPractice",
|
|
153
|
+
"severityLevel": "Warning",
|
|
154
|
+
"title": "Avoid Design Duplicated Code",
|
|
155
|
+
"enabled": false,
|
|
156
|
+
"languages": ["Elixir"],
|
|
157
|
+
"parameters": [
|
|
158
|
+
{
|
|
159
|
+
"name": "excluded_macros",
|
|
160
|
+
"default": "[]",
|
|
161
|
+
"description": "List of macros to be excluded for this check."
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "mass_threshold",
|
|
165
|
+
"default": "40",
|
|
166
|
+
"description": "The minimum mass which a part of code has to have to qualify for this check."
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "nodes_threshold",
|
|
170
|
+
"default": "2",
|
|
171
|
+
"description": "The number of nodes that need to be found to raise an issue."
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "Credo_design_skip_test_without_comment",
|
|
177
|
+
"category": "BestPractice",
|
|
178
|
+
"severityLevel": "Info",
|
|
179
|
+
"title": "Require Comment for Skipped Tests",
|
|
180
|
+
"enabled": false,
|
|
181
|
+
"languages": ["Elixir"],
|
|
182
|
+
"parameters": [
|
|
183
|
+
{
|
|
184
|
+
"name": "files",
|
|
185
|
+
"default": "{\"included\":[\"test/**/*_test.exs\",\"apps/**/test/**/*_test.exs\"]}"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "Credo_design_tag_fixme",
|
|
191
|
+
"category": "BestPractice",
|
|
192
|
+
"severityLevel": "Warning",
|
|
193
|
+
"title": "Avoid FIXME Comments",
|
|
194
|
+
"enabled": true,
|
|
195
|
+
"languages": ["Elixir"],
|
|
196
|
+
"parameters": [
|
|
197
|
+
{
|
|
198
|
+
"name": "include_doc",
|
|
199
|
+
"default": "true",
|
|
200
|
+
"description": "Set to `true` to also include tags from @doc attributes."
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"id": "Credo_design_tag_todo",
|
|
206
|
+
"category": "BestPractice",
|
|
207
|
+
"severityLevel": "Info",
|
|
208
|
+
"title": "Avoid TODO Comments",
|
|
209
|
+
"enabled": true,
|
|
210
|
+
"languages": ["Elixir"],
|
|
211
|
+
"parameters": [
|
|
212
|
+
{
|
|
213
|
+
"name": "include_doc",
|
|
214
|
+
"default": "true",
|
|
215
|
+
"description": "Set to `true` to also include tags from @doc attributes."
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "Credo_readability_alias_as",
|
|
221
|
+
"category": "Comprehensibility",
|
|
222
|
+
"severityLevel": "Info",
|
|
223
|
+
"title": "Avoid Alias Renaming with :as for Readability",
|
|
224
|
+
"enabled": false,
|
|
225
|
+
"languages": ["Elixir"],
|
|
226
|
+
"parameters": []
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"id": "Credo_readability_alias_order",
|
|
230
|
+
"category": "Comprehensibility",
|
|
231
|
+
"severityLevel": "Info",
|
|
232
|
+
"title": "Enforce Alphabetical Order of Aliases",
|
|
233
|
+
"enabled": true,
|
|
234
|
+
"languages": ["Elixir"],
|
|
235
|
+
"parameters": [
|
|
236
|
+
{
|
|
237
|
+
"name": "sort_method",
|
|
238
|
+
"default": "alpha",
|
|
239
|
+
"description": "The ordering method to use.\n\nOptions\n- `:alpha` - Alphabetical case-insensitive sorting.\n- `:ascii` - Case-sensitive sorting where upper case characters are ordered\n before their lower case equivalent.\n"
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "Credo_readability_block_pipe",
|
|
245
|
+
"category": "Comprehensibility",
|
|
246
|
+
"severityLevel": "Info",
|
|
247
|
+
"title": "Avoid Using Pipes with Blocks",
|
|
248
|
+
"enabled": false,
|
|
249
|
+
"languages": ["Elixir"],
|
|
250
|
+
"parameters": [
|
|
251
|
+
{
|
|
252
|
+
"name": "exclude",
|
|
253
|
+
"default": "[]",
|
|
254
|
+
"description": "Do not raise an issue for these macros and functions."
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "Credo_readability_function_names",
|
|
260
|
+
"category": "Comprehensibility",
|
|
261
|
+
"severityLevel": "Info",
|
|
262
|
+
"title": "Enforce Snake Case for Function Names",
|
|
263
|
+
"enabled": true,
|
|
264
|
+
"languages": ["Elixir"],
|
|
265
|
+
"parameters": [
|
|
266
|
+
{
|
|
267
|
+
"name": "allow_acronyms",
|
|
268
|
+
"default": "false",
|
|
269
|
+
"description": "Allows acronyms like HTTP or OTP in function names."
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "Credo_readability_impl_true",
|
|
275
|
+
"category": "Comprehensibility",
|
|
276
|
+
"severityLevel": "Info",
|
|
277
|
+
"title": "Avoid Using @impl true for Behaviour Implementations",
|
|
278
|
+
"enabled": false,
|
|
279
|
+
"languages": ["Elixir"],
|
|
280
|
+
"parameters": []
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "Credo_readability_large_numbers",
|
|
284
|
+
"category": "Comprehensibility",
|
|
285
|
+
"severityLevel": "Info",
|
|
286
|
+
"title": "Enforce Readability of Large Numbers",
|
|
287
|
+
"enabled": true,
|
|
288
|
+
"languages": ["Elixir"],
|
|
289
|
+
"parameters": [
|
|
290
|
+
{
|
|
291
|
+
"name": "only_greater_than",
|
|
292
|
+
"default": "9999",
|
|
293
|
+
"description": "The check only reports numbers greater than this."
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "trailing_digits",
|
|
297
|
+
"default": "[]",
|
|
298
|
+
"description": "The check allows for the given number of trailing digits (can be a number, range or list)"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"id": "Credo_readability_max_line_length",
|
|
304
|
+
"category": "Comprehensibility",
|
|
305
|
+
"severityLevel": "Info",
|
|
306
|
+
"title": "Enforce Maximum Line Length",
|
|
307
|
+
"enabled": true,
|
|
308
|
+
"languages": ["Elixir"],
|
|
309
|
+
"parameters": [
|
|
310
|
+
{
|
|
311
|
+
"name": "ignore_definitions",
|
|
312
|
+
"default": "true",
|
|
313
|
+
"description": "Set to `true` to ignore lines including function definitions."
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"name": "ignore_heredocs",
|
|
317
|
+
"default": "true"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "ignore_sigils",
|
|
321
|
+
"default": "true",
|
|
322
|
+
"description": "Set to `true` to ignore lines that are sigils, e.g. regular expressions."
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "ignore_specs",
|
|
326
|
+
"default": "false",
|
|
327
|
+
"description": "Set to `true` to ignore lines including `@spec`s."
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "ignore_strings",
|
|
331
|
+
"default": "true",
|
|
332
|
+
"description": "Set to `true` to ignore lines that are strings or in heredocs."
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "ignore_urls",
|
|
336
|
+
"default": "true",
|
|
337
|
+
"description": "Set to `true` to ignore lines that contain urls."
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "max_length",
|
|
341
|
+
"default": "120",
|
|
342
|
+
"description": "The maximum number of characters a line may consist of."
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
"tags": ["readability"]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"id": "Credo_readability_module_attribute_names",
|
|
349
|
+
"category": "Comprehensibility",
|
|
350
|
+
"severityLevel": "Info",
|
|
351
|
+
"title": "Enforce Snake_Case for Module Attribute Names",
|
|
352
|
+
"enabled": true,
|
|
353
|
+
"languages": ["Elixir"],
|
|
354
|
+
"parameters": []
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"id": "Credo_readability_module_doc",
|
|
358
|
+
"category": "Documentation",
|
|
359
|
+
"severityLevel": "Info",
|
|
360
|
+
"title": "Enforce Module Documentation",
|
|
361
|
+
"enabled": true,
|
|
362
|
+
"languages": ["Elixir"],
|
|
363
|
+
"parameters": [
|
|
364
|
+
{
|
|
365
|
+
"name": "ignore_names",
|
|
366
|
+
"default": "[\"(\\\\.\\\\w+Controller|\\\\.Endpoint|\\\\.\\\\w+Live(\\\\.\\\\w+)?|\\\\.Repo|\\\\.Router|\\\\.\\\\w+Socket|\\\\.\\\\w+View|\\\\.\\\\w+HTML|\\\\.\\\\w+JSON|\\\\.Telemetry|\\\\.Layouts|\\\\.Mailer)$\"]",
|
|
367
|
+
"description": "All modules matching this regex (or list of regexes) will be ignored."
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"id": "Credo_readability_module_names",
|
|
373
|
+
"category": "Comprehensibility",
|
|
374
|
+
"severityLevel": "Info",
|
|
375
|
+
"title": "Enforce PascalCase for Module Names",
|
|
376
|
+
"enabled": true,
|
|
377
|
+
"languages": ["Elixir"],
|
|
378
|
+
"parameters": [
|
|
379
|
+
{
|
|
380
|
+
"name": "ignore",
|
|
381
|
+
"default": "[]",
|
|
382
|
+
"description": "List of ignored module names and patterns e.g. `[~r/Sample_Module/, \"Credo.Sample_Module\"]`"
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"id": "Credo_readability_multi_alias",
|
|
388
|
+
"category": "Comprehensibility",
|
|
389
|
+
"severityLevel": "Info",
|
|
390
|
+
"title": "Avoid Multi Alias Expansion for Readability",
|
|
391
|
+
"enabled": false,
|
|
392
|
+
"languages": ["Elixir"],
|
|
393
|
+
"parameters": []
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"id": "Credo_readability_nested_function_calls",
|
|
397
|
+
"category": "Comprehensibility",
|
|
398
|
+
"severityLevel": "Info",
|
|
399
|
+
"title": "Avoid Nested Function Calls",
|
|
400
|
+
"enabled": false,
|
|
401
|
+
"languages": ["Elixir"],
|
|
402
|
+
"parameters": [
|
|
403
|
+
{
|
|
404
|
+
"name": "min_pipeline_length",
|
|
405
|
+
"default": "2",
|
|
406
|
+
"description": "Set a minimum pipeline length"
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
"tags": ["readability"]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"id": "Credo_readability_one_arity_function_in_pipe",
|
|
413
|
+
"category": "Comprehensibility",
|
|
414
|
+
"severityLevel": "Info",
|
|
415
|
+
"title": "Enforce Parentheses for One-Arity Functions in Pipe",
|
|
416
|
+
"enabled": false,
|
|
417
|
+
"languages": ["Elixir"],
|
|
418
|
+
"parameters": []
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"id": "Credo_readability_one_pipe_per_line",
|
|
422
|
+
"category": "Comprehensibility",
|
|
423
|
+
"severityLevel": "Info",
|
|
424
|
+
"title": "Enforce One Pipe Per Line in Pipe Chains",
|
|
425
|
+
"enabled": false,
|
|
426
|
+
"languages": ["Elixir"],
|
|
427
|
+
"parameters": [],
|
|
428
|
+
"tags": ["readability"]
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"id": "Credo_readability_parentheses_in_condition",
|
|
432
|
+
"category": "CodeStyle",
|
|
433
|
+
"severityLevel": "Info",
|
|
434
|
+
"title": "Avoid Parentheses Around Conditions in if/unless",
|
|
435
|
+
"enabled": true,
|
|
436
|
+
"languages": ["Elixir"],
|
|
437
|
+
"parameters": []
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"id": "Credo_readability_parentheses_on_zero_arity_defs",
|
|
441
|
+
"category": "Comprehensibility",
|
|
442
|
+
"severityLevel": "Info",
|
|
443
|
+
"title": "Enforce Consistent Use of Parentheses on Zero-Arity Function Definitions",
|
|
444
|
+
"enabled": true,
|
|
445
|
+
"languages": ["Elixir"],
|
|
446
|
+
"parameters": [
|
|
447
|
+
{
|
|
448
|
+
"name": "parens",
|
|
449
|
+
"default": "false"
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
"tags": ["readability"]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"id": "Credo_readability_pipe_into_anonymous_functions",
|
|
456
|
+
"category": "Comprehensibility",
|
|
457
|
+
"severityLevel": "Info",
|
|
458
|
+
"title": "Avoid Piping Into Anonymous Functions",
|
|
459
|
+
"enabled": true,
|
|
460
|
+
"languages": ["Elixir"],
|
|
461
|
+
"parameters": []
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"id": "Credo_readability_predicate_function_names",
|
|
465
|
+
"category": "CodeStyle",
|
|
466
|
+
"severityLevel": "Info",
|
|
467
|
+
"title": "Enforce Readability of Predicate Function Names",
|
|
468
|
+
"enabled": true,
|
|
469
|
+
"languages": ["Elixir"],
|
|
470
|
+
"parameters": []
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"id": "Credo_readability_prefer_implicit_try",
|
|
474
|
+
"category": "Comprehensibility",
|
|
475
|
+
"severityLevel": "Info",
|
|
476
|
+
"title": "Prefer Implicit Try Over Explicit Try for Rescue",
|
|
477
|
+
"enabled": true,
|
|
478
|
+
"languages": ["Elixir"],
|
|
479
|
+
"parameters": []
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"id": "Credo_readability_redundant_blank_lines",
|
|
483
|
+
"category": "Comprehensibility",
|
|
484
|
+
"severityLevel": "Info",
|
|
485
|
+
"title": "Avoid Redundant Consecutive Blank Lines",
|
|
486
|
+
"enabled": true,
|
|
487
|
+
"languages": ["Elixir"],
|
|
488
|
+
"parameters": [
|
|
489
|
+
{
|
|
490
|
+
"name": "max_blank_lines",
|
|
491
|
+
"default": "1",
|
|
492
|
+
"description": "The maximum number of tolerated consecutive blank lines."
|
|
493
|
+
}
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"id": "Credo_readability_semicolons",
|
|
498
|
+
"category": "Comprehensibility",
|
|
499
|
+
"severityLevel": "Info",
|
|
500
|
+
"title": "Avoid Using Semicolons to Separate Statements",
|
|
501
|
+
"enabled": true,
|
|
502
|
+
"languages": ["Elixir"],
|
|
503
|
+
"parameters": []
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"id": "Credo_readability_separate_alias_require",
|
|
507
|
+
"category": "CodeStyle",
|
|
508
|
+
"severityLevel": "Info",
|
|
509
|
+
"title": "Enforce Consecutive Alias and Require Statements",
|
|
510
|
+
"enabled": false,
|
|
511
|
+
"languages": ["Elixir"],
|
|
512
|
+
"parameters": []
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"id": "Credo_readability_single_function_to_block_pipe",
|
|
516
|
+
"category": "Comprehensibility",
|
|
517
|
+
"severityLevel": "Info",
|
|
518
|
+
"title": "Avoid Single Pipe Into Blocks",
|
|
519
|
+
"enabled": false,
|
|
520
|
+
"languages": ["Elixir"],
|
|
521
|
+
"parameters": []
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"id": "Credo_readability_single_pipe",
|
|
525
|
+
"category": "Comprehensibility",
|
|
526
|
+
"severityLevel": "Info",
|
|
527
|
+
"title": "Avoid Single Pipe Operator Usage",
|
|
528
|
+
"enabled": false,
|
|
529
|
+
"languages": ["Elixir"],
|
|
530
|
+
"parameters": [
|
|
531
|
+
{
|
|
532
|
+
"name": "allow_0_arity_functions",
|
|
533
|
+
"default": "false",
|
|
534
|
+
"description": "Allow 0-arity functions"
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"tags": ["readability"]
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"id": "Credo_readability_space_after_commas",
|
|
541
|
+
"category": "CodeStyle",
|
|
542
|
+
"severityLevel": "Info",
|
|
543
|
+
"title": "Enforce Readability by Using Space After Commas",
|
|
544
|
+
"enabled": true,
|
|
545
|
+
"languages": ["Elixir"],
|
|
546
|
+
"parameters": [],
|
|
547
|
+
"tags": ["readability"]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"id": "Credo_readability_specs",
|
|
551
|
+
"category": "Documentation",
|
|
552
|
+
"severityLevel": "Info",
|
|
553
|
+
"title": "Enforce Typespecs on Functions, Callbacks, and Macros",
|
|
554
|
+
"enabled": false,
|
|
555
|
+
"languages": ["Elixir"],
|
|
556
|
+
"parameters": [
|
|
557
|
+
{
|
|
558
|
+
"name": "include_defp",
|
|
559
|
+
"default": "false",
|
|
560
|
+
"description": "Include private functions."
|
|
561
|
+
}
|
|
562
|
+
]
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"id": "Credo_readability_strict_module_layout",
|
|
566
|
+
"category": "Comprehensibility",
|
|
567
|
+
"severityLevel": "Info",
|
|
568
|
+
"title": "Enforce Strict Module Layout Order",
|
|
569
|
+
"enabled": false,
|
|
570
|
+
"languages": ["Elixir"],
|
|
571
|
+
"parameters": [
|
|
572
|
+
{
|
|
573
|
+
"name": "ignore",
|
|
574
|
+
"default": "[]",
|
|
575
|
+
"description": "List of atoms identifying the module parts which are not checked, and may\ntherefore appear anywhere in the module. Supported values are the same as\nin the `:order` param.\n"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"name": "ignore_module_attributes",
|
|
579
|
+
"default": "[]",
|
|
580
|
+
"description": "List of atoms identifying the module attributes which are not checked, and may\ntherefore appear anywhere in the module. Useful for custom DSLs that use attributes\nbefore function heads.\n\nFor example, if you provide `~w/trace/a`, all `@trace` attributes will be ignored.\n"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "order",
|
|
584
|
+
"default": "[\"shortdoc\",\"moduledoc\",\"behaviour\",\"use\",\"import\",\"alias\",\"require\"]",
|
|
585
|
+
"description": "List of atoms identifying the desired order of module parts.\n\nSupported values are:\n\n- `:moduledoc` - `@moduledoc` module attribute\n- `:shortdoc` - `@shortdoc` module attribute\n- `:behaviour` - `@behaviour` module attribute\n- `:use` - `use` expression\n- `:import` - `import` expression\n- `:alias` - `alias` expression\n- `:require` - `require` expression\n- `:defstruct` - `defstruct` expression\n- `:opaque` - `@opaque` module attribute\n- `:type` - `@type` module attribute\n- `:typep` - `@typep` module attribute\n- `:callback` - `@callback` module attribute\n- `:macrocallback` - `@macrocallback` module attribute\n- `:optional_callbacks` - `@optional_callbacks` module attribute\n- `:module_attribute` - other module attribute\n- `:public_fun` - public function\n- `:private_fun` - private function or a public function marked with `@doc false`\n- `:public_macro` - public macro\n- `:private_macro` - private macro or a public macro marked with `@doc false`\n- `:callback_impl` - public function or macro marked with `@impl`\n- `:public_guard` - public guard\n- `:private_guard` - private guard or a public guard marked with `@doc false`\n- `:module` - inner module definition (`defmodule` expression inside a module)\n\nNotice that the desired order always starts from the top.\n\nFor example, if you provide the order `~w/public_fun private_fun/a`,\nit means that everything else (e.g. `@moduledoc`) must appear after\nfunction definitions.\n"
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"id": "Credo_readability_string_sigils",
|
|
591
|
+
"category": "Comprehensibility",
|
|
592
|
+
"severityLevel": "Info",
|
|
593
|
+
"title": "Use Readable String Sigils Instead of Escaped Quotes",
|
|
594
|
+
"enabled": true,
|
|
595
|
+
"languages": ["Elixir"],
|
|
596
|
+
"parameters": [
|
|
597
|
+
{
|
|
598
|
+
"name": "maximum_allowed_quotes",
|
|
599
|
+
"default": "3",
|
|
600
|
+
"description": "The maximum amount of escaped quotes you want to tolerate."
|
|
601
|
+
}
|
|
602
|
+
]
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"id": "Credo_readability_trailing_blank_line",
|
|
606
|
+
"category": "CodeStyle",
|
|
607
|
+
"severityLevel": "Info",
|
|
608
|
+
"title": "Enforce Trailing Blank Line at End of File",
|
|
609
|
+
"enabled": true,
|
|
610
|
+
"languages": ["Elixir"],
|
|
611
|
+
"parameters": []
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"id": "Credo_readability_trailing_white_space",
|
|
615
|
+
"category": "CodeStyle",
|
|
616
|
+
"severityLevel": "Info",
|
|
617
|
+
"title": "Avoid Trailing White Space",
|
|
618
|
+
"enabled": true,
|
|
619
|
+
"languages": ["Elixir"],
|
|
620
|
+
"parameters": [
|
|
621
|
+
{
|
|
622
|
+
"name": "ignore_strings",
|
|
623
|
+
"default": "true",
|
|
624
|
+
"description": "Set to `false` to check lines that are strings or in heredocs"
|
|
625
|
+
}
|
|
626
|
+
]
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"id": "Credo_readability_unnecessary_alias_expansion",
|
|
630
|
+
"category": "Comprehensibility",
|
|
631
|
+
"severityLevel": "Info",
|
|
632
|
+
"title": "Avoid Unnecessary Alias Expansion",
|
|
633
|
+
"enabled": true,
|
|
634
|
+
"languages": ["Elixir"],
|
|
635
|
+
"parameters": []
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"id": "Credo_readability_variable_names",
|
|
639
|
+
"category": "CodeStyle",
|
|
640
|
+
"severityLevel": "Info",
|
|
641
|
+
"title": "Enforce Variable Names in snake_case",
|
|
642
|
+
"enabled": true,
|
|
643
|
+
"languages": ["Elixir"],
|
|
644
|
+
"parameters": []
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"id": "Credo_readability_with_custom_tagged_tuple",
|
|
648
|
+
"category": "Comprehensibility",
|
|
649
|
+
"severityLevel": "Info",
|
|
650
|
+
"title": "Avoid Using Custom Tags in 'with' Macros for Error Reporting",
|
|
651
|
+
"enabled": false,
|
|
652
|
+
"languages": ["Elixir"],
|
|
653
|
+
"parameters": []
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"id": "Credo_readability_with_single_clause",
|
|
657
|
+
"category": "CodeStyle",
|
|
658
|
+
"severityLevel": "Info",
|
|
659
|
+
"title": "Prefer Case Over With for Single Clause with Else",
|
|
660
|
+
"enabled": true,
|
|
661
|
+
"languages": ["Elixir"],
|
|
662
|
+
"parameters": []
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"id": "Credo_refactor_abc_size",
|
|
666
|
+
"category": "Complexity",
|
|
667
|
+
"severityLevel": "Warning",
|
|
668
|
+
"title": "Refactor Functions with High ABC Size",
|
|
669
|
+
"enabled": false,
|
|
670
|
+
"languages": ["Elixir"],
|
|
671
|
+
"parameters": [
|
|
672
|
+
{
|
|
673
|
+
"name": "excluded_functions",
|
|
674
|
+
"default": "[]",
|
|
675
|
+
"description": "All functions listed will be ignored."
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"name": "max_size",
|
|
679
|
+
"default": "30",
|
|
680
|
+
"description": "The maximum ABC size a function should have."
|
|
681
|
+
}
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"id": "Credo_refactor_append_single_item",
|
|
686
|
+
"category": "Performance",
|
|
687
|
+
"severityLevel": "Warning",
|
|
688
|
+
"title": "Refactor Append Single Item to Prepend and Reverse",
|
|
689
|
+
"enabled": false,
|
|
690
|
+
"languages": ["Elixir"],
|
|
691
|
+
"parameters": []
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"id": "Credo_refactor_apply",
|
|
695
|
+
"category": "BestPractice",
|
|
696
|
+
"severityLevel": "Info",
|
|
697
|
+
"title": "Prefer Direct Function Calls Over apply/2 and apply/3",
|
|
698
|
+
"enabled": true,
|
|
699
|
+
"languages": ["Elixir"],
|
|
700
|
+
"parameters": []
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"id": "Credo_refactor_cond_statements",
|
|
704
|
+
"category": "Comprehensibility",
|
|
705
|
+
"severityLevel": "Info",
|
|
706
|
+
"title": "Enforce Minimum Branches in cond Statements",
|
|
707
|
+
"enabled": true,
|
|
708
|
+
"languages": ["Elixir"],
|
|
709
|
+
"parameters": []
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"id": "Credo_refactor_cyclomatic_complexity",
|
|
713
|
+
"category": "Complexity",
|
|
714
|
+
"severityLevel": "Warning",
|
|
715
|
+
"title": "Refactor Cyclomatic Complexity",
|
|
716
|
+
"enabled": true,
|
|
717
|
+
"languages": ["Elixir"],
|
|
718
|
+
"parameters": [
|
|
719
|
+
{
|
|
720
|
+
"name": "max_complexity",
|
|
721
|
+
"default": "9",
|
|
722
|
+
"description": "The maximum cyclomatic complexity a function should have."
|
|
723
|
+
}
|
|
724
|
+
]
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"id": "Credo_refactor_double_boolean_negation",
|
|
728
|
+
"category": "BestPractice",
|
|
729
|
+
"severityLevel": "Info",
|
|
730
|
+
"title": "Avoid Double Boolean Negation",
|
|
731
|
+
"enabled": false,
|
|
732
|
+
"languages": ["Elixir"],
|
|
733
|
+
"parameters": []
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"id": "Credo_refactor_filter_count",
|
|
737
|
+
"category": "Performance",
|
|
738
|
+
"severityLevel": "Warning",
|
|
739
|
+
"title": "Refactor Filter Count to Use Enum.count/2",
|
|
740
|
+
"enabled": true,
|
|
741
|
+
"languages": ["Elixir"],
|
|
742
|
+
"parameters": []
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"id": "Credo_refactor_filter_filter",
|
|
746
|
+
"category": "Performance",
|
|
747
|
+
"severityLevel": "Warning",
|
|
748
|
+
"title": "Refactor Multiple Enum.filter Calls into One",
|
|
749
|
+
"enabled": true,
|
|
750
|
+
"languages": ["Elixir"],
|
|
751
|
+
"parameters": []
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"id": "Credo_refactor_filter_reject",
|
|
755
|
+
"category": "Performance",
|
|
756
|
+
"severityLevel": "Warning",
|
|
757
|
+
"title": "Refactor Filter and Reject to Single Filter",
|
|
758
|
+
"enabled": false,
|
|
759
|
+
"languages": ["Elixir"],
|
|
760
|
+
"parameters": []
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"id": "Credo_refactor_function_arity",
|
|
764
|
+
"category": "Complexity",
|
|
765
|
+
"severityLevel": "Warning",
|
|
766
|
+
"title": "Refactor Function Arity",
|
|
767
|
+
"enabled": true,
|
|
768
|
+
"languages": ["Elixir"],
|
|
769
|
+
"parameters": [
|
|
770
|
+
{
|
|
771
|
+
"name": "ignore_defp",
|
|
772
|
+
"default": "false",
|
|
773
|
+
"description": "Set to `true` to ignore private functions."
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"name": "max_arity",
|
|
777
|
+
"default": "8",
|
|
778
|
+
"description": "The maximum number of parameters which a function should take."
|
|
779
|
+
}
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"id": "Credo_refactor_io_puts",
|
|
784
|
+
"category": "BestPractice",
|
|
785
|
+
"severityLevel": "Info",
|
|
786
|
+
"title": "Prefer Logger Statements Over IO.puts",
|
|
787
|
+
"enabled": false,
|
|
788
|
+
"languages": ["Elixir"],
|
|
789
|
+
"parameters": []
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"id": "Credo_refactor_long_quote_blocks",
|
|
793
|
+
"category": "Complexity",
|
|
794
|
+
"severityLevel": "Warning",
|
|
795
|
+
"title": "Refactor Long Quote Blocks",
|
|
796
|
+
"enabled": true,
|
|
797
|
+
"languages": ["Elixir"],
|
|
798
|
+
"parameters": [
|
|
799
|
+
{
|
|
800
|
+
"name": "ignore_comments",
|
|
801
|
+
"default": "false",
|
|
802
|
+
"description": "Ignores comments when counting the lines of a `quote` block."
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"name": "max_line_count",
|
|
806
|
+
"default": "150",
|
|
807
|
+
"description": "The maximum number of lines a quote block should be allowed to have."
|
|
808
|
+
}
|
|
809
|
+
]
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"id": "Credo_refactor_map_join",
|
|
813
|
+
"category": "Performance",
|
|
814
|
+
"severityLevel": "Warning",
|
|
815
|
+
"title": "Refactor to Use Enum.map_join Instead of Enum.map Followed by Enum.join",
|
|
816
|
+
"enabled": true,
|
|
817
|
+
"languages": ["Elixir"],
|
|
818
|
+
"parameters": []
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"id": "Credo_refactor_map_map",
|
|
822
|
+
"category": "Performance",
|
|
823
|
+
"severityLevel": "Warning",
|
|
824
|
+
"title": "Refactor Multiple Enum.map Calls into a Single Enum.map",
|
|
825
|
+
"enabled": false,
|
|
826
|
+
"languages": ["Elixir"],
|
|
827
|
+
"parameters": []
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"id": "Credo_refactor_match_in_condition",
|
|
831
|
+
"category": "BestPractice",
|
|
832
|
+
"severityLevel": "Info",
|
|
833
|
+
"title": "Refactor Pattern Match in Condition",
|
|
834
|
+
"enabled": true,
|
|
835
|
+
"languages": ["Elixir"],
|
|
836
|
+
"parameters": [
|
|
837
|
+
{
|
|
838
|
+
"name": "allow_tagged_tuples",
|
|
839
|
+
"default": "false",
|
|
840
|
+
"description": "Allow tagged tuples in conditions, e.g. `if {:ok, contents} = File.read( \"foo.txt\") do`"
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"id": "Credo_refactor_module_dependencies",
|
|
846
|
+
"category": "Complexity",
|
|
847
|
+
"severityLevel": "Warning",
|
|
848
|
+
"title": "Limit Module Dependencies",
|
|
849
|
+
"enabled": false,
|
|
850
|
+
"languages": ["Elixir"],
|
|
851
|
+
"parameters": [
|
|
852
|
+
{
|
|
853
|
+
"name": "dependency_namespaces",
|
|
854
|
+
"default": "[]",
|
|
855
|
+
"description": "List of dependency namespaces to include in this check"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"name": "excluded_namespaces",
|
|
859
|
+
"default": "[]",
|
|
860
|
+
"description": "List of namespaces to exclude from this check"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "excluded_paths",
|
|
864
|
+
"default": "[\"/test/\",\"^test/\"]",
|
|
865
|
+
"description": "List of paths or regex to exclude from this check"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"name": "max_deps",
|
|
869
|
+
"default": "10",
|
|
870
|
+
"description": "Maximum number of module dependencies."
|
|
871
|
+
}
|
|
872
|
+
]
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"id": "Credo_refactor_negated_conditions_in_unless",
|
|
876
|
+
"category": "Comprehensibility",
|
|
877
|
+
"severityLevel": "Info",
|
|
878
|
+
"title": "Refactor Negated Conditions in Unless",
|
|
879
|
+
"enabled": true,
|
|
880
|
+
"languages": ["Elixir"],
|
|
881
|
+
"parameters": []
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"id": "Credo_refactor_negated_conditions_with_else",
|
|
885
|
+
"category": "Comprehensibility",
|
|
886
|
+
"severityLevel": "Info",
|
|
887
|
+
"title": "Refactor Negated Conditions With Else",
|
|
888
|
+
"enabled": true,
|
|
889
|
+
"languages": ["Elixir"],
|
|
890
|
+
"parameters": []
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"id": "Credo_refactor_negated_is_nil",
|
|
894
|
+
"category": "BestPractice",
|
|
895
|
+
"severityLevel": "Info",
|
|
896
|
+
"title": "Avoid Negating is_nil Predicate",
|
|
897
|
+
"enabled": false,
|
|
898
|
+
"languages": ["Elixir"],
|
|
899
|
+
"parameters": []
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"id": "Credo_refactor_nesting",
|
|
903
|
+
"category": "Complexity",
|
|
904
|
+
"severityLevel": "Warning",
|
|
905
|
+
"title": "Refactor Excessive Nesting",
|
|
906
|
+
"enabled": true,
|
|
907
|
+
"languages": ["Elixir"],
|
|
908
|
+
"parameters": [
|
|
909
|
+
{
|
|
910
|
+
"name": "max_nesting",
|
|
911
|
+
"default": "2",
|
|
912
|
+
"description": "The maximum number of levels code should be nested."
|
|
913
|
+
}
|
|
914
|
+
]
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"id": "Credo_refactor_pass_async_in_test_cases",
|
|
918
|
+
"category": "Performance",
|
|
919
|
+
"severityLevel": "Warning",
|
|
920
|
+
"title": "Enforce Async Option in Test Modules",
|
|
921
|
+
"enabled": false,
|
|
922
|
+
"languages": ["Elixir"],
|
|
923
|
+
"parameters": [
|
|
924
|
+
{
|
|
925
|
+
"name": "files",
|
|
926
|
+
"default": "{\"included\":[\"test/**/*_test.exs\",\"apps/**/test/**/*_test.exs\"]}"
|
|
927
|
+
}
|
|
928
|
+
]
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"id": "Credo_refactor_pipe_chain_start",
|
|
932
|
+
"category": "Comprehensibility",
|
|
933
|
+
"severityLevel": "Info",
|
|
934
|
+
"title": "Refactor Pipe Chain Start for Readability",
|
|
935
|
+
"enabled": false,
|
|
936
|
+
"languages": ["Elixir"],
|
|
937
|
+
"parameters": [
|
|
938
|
+
{
|
|
939
|
+
"name": "excluded_argument_types",
|
|
940
|
+
"default": "[]",
|
|
941
|
+
"description": "All pipes with argument types listed will be ignored."
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "excluded_functions",
|
|
945
|
+
"default": "[]",
|
|
946
|
+
"description": "All functions listed will be ignored."
|
|
947
|
+
}
|
|
948
|
+
]
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"id": "Credo_refactor_redundant_with_clause_result",
|
|
952
|
+
"category": "BestPractice",
|
|
953
|
+
"severityLevel": "Info",
|
|
954
|
+
"title": "Refactor Redundant With Clause Result",
|
|
955
|
+
"enabled": true,
|
|
956
|
+
"languages": ["Elixir"],
|
|
957
|
+
"parameters": []
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"id": "Credo_refactor_reject_filter",
|
|
961
|
+
"category": "Performance",
|
|
962
|
+
"severityLevel": "Warning",
|
|
963
|
+
"title": "Refactor Reject Filter to Single Enum.filter",
|
|
964
|
+
"enabled": false,
|
|
965
|
+
"languages": ["Elixir"],
|
|
966
|
+
"parameters": []
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"id": "Credo_refactor_reject_reject",
|
|
970
|
+
"category": "Performance",
|
|
971
|
+
"severityLevel": "Warning",
|
|
972
|
+
"title": "Refactor Multiple Enum.reject Calls into Single Call",
|
|
973
|
+
"enabled": true,
|
|
974
|
+
"languages": ["Elixir"],
|
|
975
|
+
"parameters": []
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"id": "Credo_refactor_unless_with_else",
|
|
979
|
+
"category": "Comprehensibility",
|
|
980
|
+
"severityLevel": "Info",
|
|
981
|
+
"title": "Refactor Unless With Else",
|
|
982
|
+
"enabled": true,
|
|
983
|
+
"languages": ["Elixir"],
|
|
984
|
+
"parameters": []
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"id": "Credo_refactor_utc_now_truncate",
|
|
988
|
+
"category": "Performance",
|
|
989
|
+
"severityLevel": "Info",
|
|
990
|
+
"title": "Refactor to Use DateTime.utc_now/1 Instead of Truncate",
|
|
991
|
+
"enabled": false,
|
|
992
|
+
"languages": ["Elixir"],
|
|
993
|
+
"parameters": []
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"id": "Credo_refactor_variable_rebinding",
|
|
997
|
+
"category": "Comprehensibility",
|
|
998
|
+
"severityLevel": "Info",
|
|
999
|
+
"title": "Avoid Variable Rebinding",
|
|
1000
|
+
"enabled": false,
|
|
1001
|
+
"languages": ["Elixir"],
|
|
1002
|
+
"parameters": [
|
|
1003
|
+
{
|
|
1004
|
+
"name": "allow_bang",
|
|
1005
|
+
"default": "false",
|
|
1006
|
+
"description": "Variables with a bang suffix will be ignored."
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"id": "Credo_refactor_with_clauses",
|
|
1012
|
+
"category": "BestPractice",
|
|
1013
|
+
"severityLevel": "Info",
|
|
1014
|
+
"title": "Refactor With Clauses",
|
|
1015
|
+
"enabled": true,
|
|
1016
|
+
"languages": ["Elixir"],
|
|
1017
|
+
"parameters": []
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"id": "Credo_warning_application_config_in_module_attribute",
|
|
1021
|
+
"category": "ErrorProne",
|
|
1022
|
+
"severityLevel": "High",
|
|
1023
|
+
"title": "Avoid Application Config Calls in Module Attributes",
|
|
1024
|
+
"enabled": true,
|
|
1025
|
+
"languages": ["Elixir"],
|
|
1026
|
+
"parameters": []
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"id": "Credo_warning_bool_operation_on_same_values",
|
|
1030
|
+
"category": "ErrorProne",
|
|
1031
|
+
"severityLevel": "Warning",
|
|
1032
|
+
"title": "Avoid Boolean Operations On Identical Values",
|
|
1033
|
+
"enabled": true,
|
|
1034
|
+
"languages": ["Elixir"],
|
|
1035
|
+
"parameters": []
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"id": "Credo_warning_dbg",
|
|
1039
|
+
"category": "BestPractice",
|
|
1040
|
+
"severityLevel": "Warning",
|
|
1041
|
+
"title": "Avoid Calls to dbg/0 and dbg/2 Outside Debugging",
|
|
1042
|
+
"enabled": true,
|
|
1043
|
+
"languages": ["Elixir"],
|
|
1044
|
+
"parameters": []
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"id": "Credo_warning_expensive_empty_enum_check",
|
|
1048
|
+
"category": "Performance",
|
|
1049
|
+
"severityLevel": "Warning",
|
|
1050
|
+
"title": "Avoid Expensive Empty Enum Checks",
|
|
1051
|
+
"enabled": true,
|
|
1052
|
+
"languages": ["Elixir"],
|
|
1053
|
+
"parameters": []
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"id": "Credo_warning_i_ex_pry",
|
|
1057
|
+
"category": "BestPractice",
|
|
1058
|
+
"severityLevel": "Warning",
|
|
1059
|
+
"title": "Avoid Calls to IEx.pry in Production Code",
|
|
1060
|
+
"enabled": true,
|
|
1061
|
+
"languages": ["Elixir"],
|
|
1062
|
+
"parameters": []
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"id": "Credo_warning_io_inspect",
|
|
1066
|
+
"category": "BestPractice",
|
|
1067
|
+
"severityLevel": "Warning",
|
|
1068
|
+
"title": "Avoid Calls to IO.inspect in Production Code",
|
|
1069
|
+
"enabled": true,
|
|
1070
|
+
"languages": ["Elixir"],
|
|
1071
|
+
"parameters": []
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"id": "Credo_warning_lazy_logging",
|
|
1075
|
+
"category": "Performance",
|
|
1076
|
+
"severityLevel": "Warning",
|
|
1077
|
+
"title": "Enforce Lazy Logging in Logger Calls",
|
|
1078
|
+
"enabled": false,
|
|
1079
|
+
"languages": ["Elixir"],
|
|
1080
|
+
"parameters": [
|
|
1081
|
+
{
|
|
1082
|
+
"name": "ignore",
|
|
1083
|
+
"default": "[\"error\",\"warn\",\"info\"]",
|
|
1084
|
+
"description": "Do not raise an issue for these Logger calls."
|
|
1085
|
+
}
|
|
1086
|
+
]
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"id": "Credo_warning_leaky_environment",
|
|
1090
|
+
"category": "Security",
|
|
1091
|
+
"severityLevel": "High",
|
|
1092
|
+
"title": "Avoid Leaky Environment Variables in Child Processes",
|
|
1093
|
+
"enabled": false,
|
|
1094
|
+
"languages": ["Elixir"],
|
|
1095
|
+
"parameters": []
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"id": "Credo_warning_map_get_unsafe_pass",
|
|
1099
|
+
"category": "ErrorProne",
|
|
1100
|
+
"severityLevel": "High",
|
|
1101
|
+
"title": "Avoid Unsafe Use of Map.get Without Default in Pipe",
|
|
1102
|
+
"enabled": false,
|
|
1103
|
+
"languages": ["Elixir"],
|
|
1104
|
+
"parameters": []
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"id": "Credo_warning_missed_metadata_key_in_logger_config",
|
|
1108
|
+
"category": "BestPractice",
|
|
1109
|
+
"severityLevel": "Warning",
|
|
1110
|
+
"title": "Ensure Custom Metadata Keys Are Included in Logger Configuration",
|
|
1111
|
+
"enabled": true,
|
|
1112
|
+
"languages": ["Elixir"],
|
|
1113
|
+
"parameters": [
|
|
1114
|
+
{
|
|
1115
|
+
"name": "metadata_keys",
|
|
1116
|
+
"default": "[]",
|
|
1117
|
+
"description": "Do not raise an issue for these Logger metadata keys.\n\nBy default, we read the metadata keys configured as the current environment's\n`:default_formatter` (or `:console` for older versions of Elixir).\n\nYou can use this parameter to dynamically load the environment/backend you care about,\nvia `.credo.exs` (e.g. reading the `:file_log` config from `config/prod.exs`):\n\n {Credo.Check.Warning.MissedMetadataKeyInLoggerConfig,\n [\n metadata_keys:\n \"config/prod.exs\"\n |> Config.Reader.read!()\n |> get_in([:logger, :file_log, :metadata])\n ]}\n"
|
|
1118
|
+
}
|
|
1119
|
+
]
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"id": "Credo_warning_mix_env",
|
|
1123
|
+
"category": "ErrorProne",
|
|
1124
|
+
"severityLevel": "High",
|
|
1125
|
+
"title": "Avoid Accessing Mix.env in Application Code",
|
|
1126
|
+
"enabled": false,
|
|
1127
|
+
"languages": ["Elixir"],
|
|
1128
|
+
"parameters": [
|
|
1129
|
+
{
|
|
1130
|
+
"name": "excluded_paths",
|
|
1131
|
+
"default": "[]",
|
|
1132
|
+
"description": "List of paths or regex to exclude from this check"
|
|
1133
|
+
}
|
|
1134
|
+
]
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"id": "Credo_warning_operation_on_same_values",
|
|
1138
|
+
"category": "ErrorProne",
|
|
1139
|
+
"severityLevel": "Warning",
|
|
1140
|
+
"title": "Avoid Operations On Same Values",
|
|
1141
|
+
"enabled": true,
|
|
1142
|
+
"languages": ["Elixir"],
|
|
1143
|
+
"parameters": []
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"id": "Credo_warning_operation_with_constant_result",
|
|
1147
|
+
"category": "BestPractice",
|
|
1148
|
+
"severityLevel": "Info",
|
|
1149
|
+
"title": "Avoid Operations With Constant Result",
|
|
1150
|
+
"enabled": true,
|
|
1151
|
+
"languages": ["Elixir"],
|
|
1152
|
+
"parameters": []
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"id": "Credo_warning_raise_inside_rescue",
|
|
1156
|
+
"category": "ErrorProne",
|
|
1157
|
+
"severityLevel": "Warning",
|
|
1158
|
+
"title": "Avoid Using Kernel.raise Inside Rescue Blocks",
|
|
1159
|
+
"enabled": true,
|
|
1160
|
+
"languages": ["Elixir"],
|
|
1161
|
+
"parameters": []
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"id": "Credo_warning_spec_with_struct",
|
|
1165
|
+
"category": "Performance",
|
|
1166
|
+
"severityLevel": "Warning",
|
|
1167
|
+
"title": "Avoid Using Structs Directly in Specs",
|
|
1168
|
+
"enabled": true,
|
|
1169
|
+
"languages": ["Elixir"],
|
|
1170
|
+
"parameters": []
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
"id": "Credo_warning_unsafe_exec",
|
|
1174
|
+
"category": "Security",
|
|
1175
|
+
"severityLevel": "Error",
|
|
1176
|
+
"title": "Avoid Unsafe External Command Execution",
|
|
1177
|
+
"enabled": true,
|
|
1178
|
+
"languages": ["Elixir"],
|
|
1179
|
+
"parameters": []
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"id": "Credo_warning_unsafe_to_atom",
|
|
1183
|
+
"category": "Security",
|
|
1184
|
+
"severityLevel": "High",
|
|
1185
|
+
"title": "Avoid Unsafe Dynamic Atom Creation",
|
|
1186
|
+
"enabled": false,
|
|
1187
|
+
"languages": ["Elixir"],
|
|
1188
|
+
"parameters": []
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"id": "Credo_warning_unused_enum_operation",
|
|
1192
|
+
"category": "ErrorProne",
|
|
1193
|
+
"severityLevel": "High",
|
|
1194
|
+
"title": "Warn on Unused Enum Operation Result",
|
|
1195
|
+
"enabled": true,
|
|
1196
|
+
"languages": ["Elixir"],
|
|
1197
|
+
"parameters": []
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"id": "Credo_warning_unused_file_operation",
|
|
1201
|
+
"category": "ErrorProne",
|
|
1202
|
+
"severityLevel": "High",
|
|
1203
|
+
"title": "Use Result of File Module Functions",
|
|
1204
|
+
"enabled": true,
|
|
1205
|
+
"languages": ["Elixir"],
|
|
1206
|
+
"parameters": []
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"id": "Credo_warning_unused_keyword_operation",
|
|
1210
|
+
"category": "ErrorProne",
|
|
1211
|
+
"severityLevel": "High",
|
|
1212
|
+
"title": "Enforce Usage of Keyword Module Function Results",
|
|
1213
|
+
"enabled": true,
|
|
1214
|
+
"languages": ["Elixir"],
|
|
1215
|
+
"parameters": []
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"id": "Credo_warning_unused_list_operation",
|
|
1219
|
+
"category": "ErrorProne",
|
|
1220
|
+
"severityLevel": "High",
|
|
1221
|
+
"title": "Enforce Use of List Operation Results",
|
|
1222
|
+
"enabled": true,
|
|
1223
|
+
"languages": ["Elixir"],
|
|
1224
|
+
"parameters": []
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"id": "Credo_warning_unused_path_operation",
|
|
1228
|
+
"category": "ErrorProne",
|
|
1229
|
+
"severityLevel": "High",
|
|
1230
|
+
"title": "Warn on Unused Path Module Operation Result",
|
|
1231
|
+
"enabled": true,
|
|
1232
|
+
"languages": ["Elixir"],
|
|
1233
|
+
"parameters": []
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
"id": "Credo_warning_unused_regex_operation",
|
|
1237
|
+
"category": "ErrorProne",
|
|
1238
|
+
"severityLevel": "High",
|
|
1239
|
+
"title": "Avoid Unused Regex Operations",
|
|
1240
|
+
"enabled": true,
|
|
1241
|
+
"languages": ["Elixir"],
|
|
1242
|
+
"parameters": []
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"id": "Credo_warning_unused_string_operation",
|
|
1246
|
+
"category": "ErrorProne",
|
|
1247
|
+
"severityLevel": "High",
|
|
1248
|
+
"title": "Warn on Unused String Operation Result",
|
|
1249
|
+
"enabled": true,
|
|
1250
|
+
"languages": ["Elixir"],
|
|
1251
|
+
"parameters": []
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
"id": "Credo_warning_unused_tuple_operation",
|
|
1255
|
+
"category": "ErrorProne",
|
|
1256
|
+
"severityLevel": "High",
|
|
1257
|
+
"title": "Warn on Unused Tuple Operation Result",
|
|
1258
|
+
"enabled": true,
|
|
1259
|
+
"languages": ["Elixir"],
|
|
1260
|
+
"parameters": []
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"id": "Credo_warning_wrong_test_file_extension",
|
|
1264
|
+
"category": "ErrorProne",
|
|
1265
|
+
"severityLevel": "High",
|
|
1266
|
+
"title": "Avoid Wrong Test File Extension",
|
|
1267
|
+
"enabled": true,
|
|
1268
|
+
"languages": ["Elixir"],
|
|
1269
|
+
"parameters": [
|
|
1270
|
+
{
|
|
1271
|
+
"name": "files",
|
|
1272
|
+
"default": "{\"included\":[\"test/**/*_test.ex\",\"apps/**/test/**/*_test.ex\"]}"
|
|
1273
|
+
}
|
|
1274
|
+
]
|
|
1275
|
+
}
|
|
1276
|
+
]
|