-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathNsDepCopConfig.xsd
220 lines (212 loc) · 10.9 KB
/
NsDepCopConfig.xsd
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
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="NsDepCopConfig">
<xs:annotation>
<xs:documentation>
The root tag for NsDepCop config files. Add any number of Allowed, Disallowed and VisibleMembers children in any order.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Allowed" type="AllowedNamespaceDependecySpecification">
<xs:annotation>
<xs:documentation>
Defines an allowed namespace dependency.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Disallowed" type="NamespaceDependecySpecification">
<xs:annotation>
<xs:documentation>
Defines a disallowed namespace dependency.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="VisibleMembers" type="TypeListOfNamespace">
<xs:annotation>
<xs:documentation>
Defines the types of a namespace that are visible for all other namespaces. Empty type list means no restriction.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AllowedAssembly" type="NamespaceDependecySpecification">
<xs:annotation>
<xs:documentation>
Defines an allowed assembly dependency.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DisallowedAssembly" type="NamespaceDependecySpecification">
<xs:annotation>
<xs:documentation>
Defines a disallowed assembly dependency.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:attribute name="InheritanceDepth" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>
Set the number of folder levels to traverse upwards to find and combine config files. Default is 0 (no inheritance).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IsEnabled" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>
Set to true to perform analysis on the current project, false to skip analysis. Default is true.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CodeIssueKind" type="CodeIssueKind" use="optional">
<xs:annotation>
<xs:documentation>
Sets the severity of the dependency violations: Info, Warning (default), Error.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MaxIssueCount" type="xs:int" use="optional">
<xs:annotation>
<xs:documentation>
Sets the maximum number of issues reported from a project. After reaching this number analysis stops. Default is 100.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MaxIssueCountSeverity" type="CodeIssueKind" use="optional">
<xs:annotation>
<xs:documentation>
Sets the severity of the event when MaxIssueCount is reached: Info, Warning (default), Error.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="AutoLowerMaxIssueCount" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>
If set to true then after analysis automatically sets MaxIssueCount to the current issue count if it is lower than the current MaxIssueCount. Default is false.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ChildCanDependOnParentImplicitly" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>
Set to true to enable types to depend on any other types defined in parent namespaces. Default is false (for backward compatibility).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ParentCanDependOnChildImplicitly" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>
Set to true to enable all parent namespaces to depend on any of their children namespaces. Default is false.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="InfoImportance" type="MessageImportance" use="optional">
<xs:annotation>
<xs:documentation>
Sets the importance level of NsDepCop information messages: Low, Normal (default), High. This setting combined with MsBuild verbosity will determine whether information messages show up in the output or not.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="AnalyzerServiceCallRetryTimeSpans" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
Sets the interval lengths between subsequent retries when calling the analyzer service. Must be a list of integers (milliseconds) separated with comma. E.g.: 100,500,1000,5000
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludedFiles" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
File patterns that define which source files should be excluded from the analysis. Comma separated list of https://github.com/dazinator/DotNet.Glob patterns. Paths are relative to the config file's folder. E.g.: **/*.g.cs,TestFiles/*.cs
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckAssemblyDependencies" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>
We adopt the 'disallowed-by-default' approach for assembly dependencies check, similar to how we handle namespace dependencies (where everything is disallowed unless explicitly permitted). To ensure the backward compatibility, this configuration attribute has been introduced to explicitly enable the assembly dependency checking. By default this attribute is false.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:simpleType name="CodeIssueKind" >
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Info" />
<xs:enumeration value="Warning" />
<xs:enumeration value="Error" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="MessageImportance" >
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Low" />
<xs:enumeration value="Normal" />
<xs:enumeration value="High" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="NamespaceDependecySpecification">
<xs:attribute name="From" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The fully qualified name of the namespace that depends on the other namespace.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="To" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The fully qualified name of the namespace that the other namespace depends on.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="AllowedNamespaceDependecySpecification">
<xs:complexContent>
<xs:extension base="NamespaceDependecySpecification">
<xs:sequence>
<xs:element name="VisibleMembers" type="TypeList" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
Defines the types of the target namespace that are visible to the source namespace(s). Omitting this element or empty type list means no restriction.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TypeList">
<xs:sequence>
<xs:element name="Type" type="TypeName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Specifies a type.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TypeListOfNamespace">
<xs:complexContent>
<xs:extension base="TypeList">
<xs:attribute name="OfNamespace" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
The fully qualified name of the namespace whose types are listed.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TypeName">
<xs:attribute name="Name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
A type name without namespace qualification. Generic type names must be in metadata format (eg: List`1).
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>