-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
RuleSetSchema.xsd
119 lines (101 loc) · 4.49 KB
/
RuleSetSchema.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
<?xml version="1.0" encoding="utf-8"?>
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation xml:lang="en">
Visual Studio Code Analysis Rule Set Schema Definition Language.
Copyright (c) Microsoft Corporation. All rights reserved.
</xs:documentation>
</xs:annotation>
<!-- Every time this file changes, be sure to change the Validate method for the corresponding object in the code -->
<xs:element name="RuleSet" type="TRuleSet">
</xs:element>
<xs:complexType name="TLocalization">
<xs:all>
<xs:element name="Name" type="TName" minOccurs="0" maxOccurs="1" />
<xs:element name="Description" type="TDescription" minOccurs="0" maxOccurs="1" />
</xs:all>
<xs:attribute name="ResourceAssembly" type="TNonEmptyString" use="required" />
<xs:attribute name="ResourceBaseName" type="TNonEmptyString" use="required" />
</xs:complexType>
<xs:complexType name="TRuleHintPaths">
<xs:sequence>
<xs:element name="Path" type="TNonEmptyString" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="TName">
<xs:attribute name="Resource" type="TNonEmptyString" use="required" />
</xs:complexType>
<xs:complexType name="TDescription">
<xs:attribute name="Resource" type="TNonEmptyString" use="required" />
</xs:complexType>
<xs:complexType name="TInclude">
<xs:attribute name="Path" type="TNonEmptyString" use="required" />
<xs:attribute name="Action" type="TIncludeAction" use="required" />
</xs:complexType>
<xs:complexType name="TIncludeAll">
<xs:attribute name="Action" type="TIncludeAllAction" use="required" />
</xs:complexType>
<xs:complexType name="TRule">
<xs:attribute name="Id" type="TNonEmptyString" use="required" />
<xs:attribute name="Action" type="TRuleAction" use="required" />
</xs:complexType>
<xs:complexType name="TRules">
<xs:sequence>
<xs:element name="Rule" type="TRule" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="AnalyzerId" type="TNonEmptyString" use="required" />
<xs:attribute name="RuleNamespace" type="TNonEmptyString" use="required" />
</xs:complexType>
<xs:complexType name="TRuleSet">
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element name="Localization" type="TLocalization" minOccurs="0" maxOccurs="1" />
<xs:element name="RuleHintPaths" type="TRuleHintPaths" minOccurs="0" maxOccurs="1" />
<xs:element name="IncludeAll" type="TIncludeAll" minOccurs="0" maxOccurs="1" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Include" type="TInclude" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Rules" type="TRules" minOccurs="0" maxOccurs="unbounded">
<xs:unique name="UniqueRuleName">
<xs:selector xpath="Rule" />
<xs:field xpath="@Id" />
</xs:unique>
</xs:element>
</xs:choice>
</xs:sequence>
<xs:attribute name="Name" type="TNonEmptyString" use="required" />
<xs:attribute name="Description" type="xs:string" use="optional" />
<xs:attribute name="ToolsVersion" type="TNonEmptyString" use="required" />
</xs:complexType>
<xs:simpleType name="TRuleAction">
<xs:restriction base="xs:string">
<xs:enumeration value="Error"/>
<xs:enumeration value="Warning"/>
<xs:enumeration value="Info"/>
<xs:enumeration value="Hidden"/>
<xs:enumeration value="None"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TIncludeAction">
<xs:restriction base="xs:string">
<xs:enumeration value="Error"/>
<xs:enumeration value="Warning"/>
<xs:enumeration value="Info"/>
<xs:enumeration value="Hidden"/>
<xs:enumeration value="None"/>
<xs:enumeration value="Default"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TIncludeAllAction">
<xs:restriction base="xs:string">
<xs:enumeration value="Error"/>
<xs:enumeration value="Warning"/>
<xs:enumeration value="Info"/>
<xs:enumeration value="Hidden"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TNonEmptyString">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:schema>