forked from mathworks/MATLAB-Coding-Guidelines
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeAnalyzerConfiguration.json
More file actions
119 lines (118 loc) · 3.45 KB
/
codeAnalyzerConfiguration.json
File metadata and controls
119 lines (118 loc) · 3.45 KB
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
{
"name": "MATLAB Coding Guidelines",
"description": "Configuration for code analysis based on MATLAB coding guidelines",
"author" :"Mathworks",
"guidelineVersion": "1.0.0",
"schemaVersion" : "1.1.0",
"baseConfiguration" : "factory",
"checks" : {
"MNCSN": {
"limit": 5,
"enabled": true
},
"LLMNC": {
"limit": 120,
"enabled": true
},
"FCNIL": {
"limit": 6,
"enabled": true
},
"FCNOL": {
"limit": 4,
"enabled": true
},
// The following checks are disabled by default, but can be enabled
"DAFPV": {
"enabled": false
},
"DAFCVC": {
"enabled": false
},
"DAFCF": {
"enabled": false
},
"DAFCO": {
"enabled": false
},
"DAFBR": {
"enabled": false
},
"DAFRT": {
"enabled": false
},
"DAFNF": {
"enabled": false
},
"DAFVI" : {
"enabled": false
},
"CTCH" : {
"enabled": false
},
"disallow.eval": { // Name of this check can be changed.
"rule" : {
"template" : "functionCall",
"functionNames" : "eval"
},
"enabled": false
},
"disallow.workspace": {
"rule" : {
"template" : "functionCall",
"functionNames" : ["evalin", "assignin"]
},
"enabled": false
},
"disallow.pathFunction": {
"rule" : {
"template" : "functionCall",
"functionNames" : ["cd", "addpath", "rmpath"]
},
"enabled": false
},
"disallow.throwAsCaller": {
"rule" : {
"template" : "functionCall",
"functionNames" : "throwAsCaller"
},
"enabled": false
}
},
"naming" : {
"variable": {
"maxLength" : 32, // naming.variable.maxLength
"regularExpression" : "(^[a-z][a-zA-Z0-9]*$)|(^[A-Z][a-z0-9]*$)" // naming.variable.regularExpression
},
"class": {
"maxLength" : 32 // naming.class.maxLength
},
"function": {
"maxLength" : 32, // naming.function.maxLength
"casing": ["lowerCamelCase", "lowercase"] // naming.function.casing
},
"localFunction": {
"maxLength" : 32, // naming.localFunction.maxLength
"casing": ["lowerCamelCase", "lowercase"] // naming.localFunction.casing
},
"nestedFunction": {
"maxLength" : 32, // naming.nestedFunction.maxLength
"casing": ["lowerCamelCase", "lowercase"] // naming.nestedFunction.casing
},
"method": {
"maxLength" : 32, // naming.method.maxLength
"casing": ["lowerCamelCase", "lowercase"] // naming.method.casing
},
"property": {
"maxLength" : 32, // naming.property.maxLength
"casing": "UpperCamelCase" // naming.property.casing
},
"event": {
"maxLength" : 32, // naming.event.maxLength
"casing": "UpperCamelCase" // naming.event.casing
},
"enumeration": {
"maxLength" : 32 // naming.enumeration.maxLength
}
}
}