Skip to content

Commit 04854eb

Browse files
committed
Merge branch 'feature/xsd-allow-for-phpcs-phpcbf-only' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents beeb36f + 95780e5 commit 04854eb

File tree

1 file changed

+44
-16
lines changed

1 file changed

+44
-16
lines changed

phpcs.xsd

+44-16
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,31 @@
99
<xs:complexType>
1010
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
1111
<xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
12+
<xs:attributeGroup ref="applySelectively"/>
1213
</xs:complexType>
1314
</xs:element>
14-
<xs:element name="file" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element>
15+
<xs:element name="file" maxOccurs="unbounded" minOccurs="0">
16+
<xs:complexType>
17+
<xs:simpleContent>
18+
<xs:extension base="xs:string">
19+
<xs:attributeGroup ref="applySelectively"/>
20+
</xs:extension>
21+
</xs:simpleContent>
22+
</xs:complexType>
23+
</xs:element>
1524
<xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
1625
<xs:element name="arg" maxOccurs="unbounded" minOccurs="0">
1726
<xs:complexType>
1827
<xs:attribute name="name" type="xs:string"></xs:attribute>
1928
<xs:attribute name="value" type="xs:string"></xs:attribute>
29+
<xs:attributeGroup ref="applySelectively"/>
2030
</xs:complexType>
2131
</xs:element>
2232
<xs:element name="ini" maxOccurs="unbounded" minOccurs="0">
2333
<xs:complexType>
2434
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
2535
<xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
36+
<xs:attributeGroup ref="applySelectively"/>
2637
</xs:complexType>
2738
</xs:element>
2839
<xs:element name="autoload" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element>
@@ -38,23 +49,34 @@
3849
<xs:element name="exclude" maxOccurs="unbounded" minOccurs="0">
3950
<xs:complexType>
4051
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
52+
<xs:attributeGroup ref="applySelectively"/>
4153
</xs:complexType>
4254
</xs:element>
4355
<xs:element name="message" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
44-
<xs:element name="severity" type="xs:integer" maxOccurs="1" minOccurs="0"></xs:element>
56+
<xs:element name="severity" maxOccurs="1" minOccurs="0">
57+
<xs:complexType>
58+
<xs:simpleContent>
59+
<xs:extension base="xs:integer">
60+
<xs:attributeGroup ref="applySelectively"/>
61+
</xs:extension>
62+
</xs:simpleContent>
63+
</xs:complexType>
64+
</xs:element>
4565
<xs:element name="type" maxOccurs="1" minOccurs="0">
46-
<xs:simpleType>
47-
<xs:restriction base="xs:string">
48-
<xs:enumeration value="error"></xs:enumeration>
49-
<xs:enumeration value="warning"></xs:enumeration>
50-
</xs:restriction>
51-
</xs:simpleType>
66+
<xs:complexType>
67+
<xs:simpleContent>
68+
<xs:extension base="messageType">
69+
<xs:attributeGroup ref="applySelectively"/>
70+
</xs:extension>
71+
</xs:simpleContent>
72+
</xs:complexType>
5273
</xs:element>
5374
<xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
5475
<xs:element name="include-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
5576
<xs:element name="properties" type="propertiesType" maxOccurs="1" minOccurs="0"></xs:element>
5677
</xs:choice>
5778
<xs:attribute name="ref" type="xs:string" use="required"></xs:attribute>
79+
<xs:attributeGroup ref="applySelectively"/>
5880
</xs:complexType>
5981

6082
<xs:complexType name="patternType">
@@ -67,6 +89,7 @@
6789
</xs:restriction>
6890
</xs:simpleType>
6991
</xs:attribute>
92+
<xs:attributeGroup ref="applySelectively"/>
7093
</xs:extension>
7194
</xs:simpleContent>
7295
</xs:complexType>
@@ -92,17 +115,22 @@
92115
</xs:attribute>
93116
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
94117
<xs:attribute name="value" type="xs:string"></xs:attribute>
95-
<xs:attribute name="extend">
96-
<xs:simpleType>
97-
<xs:restriction base="xs:string">
98-
<xs:enumeration value="true"/>
99-
<xs:enumeration value="false"/>
100-
</xs:restriction>
101-
</xs:simpleType>
102-
</xs:attribute>
118+
<xs:attribute name="extend" type="xs:boolean" default="false"/>
119+
<xs:attributeGroup ref="applySelectively"/>
103120
</xs:complexType>
104121
</xs:element>
105122
</xs:sequence>
106123
</xs:complexType>
107124

125+
<xs:simpleType name="messageType">
126+
<xs:restriction base="xs:string">
127+
<xs:enumeration value="error"></xs:enumeration>
128+
<xs:enumeration value="warning"></xs:enumeration>
129+
</xs:restriction>
130+
</xs:simpleType>
131+
132+
<xs:attributeGroup name="applySelectively">
133+
<xs:attribute name="phpcs-only" type="xs:boolean" default="false"/>
134+
<xs:attribute name="phpcbf-only" type="xs:boolean" default="false"/>
135+
</xs:attributeGroup>
108136
</xs:schema>

0 commit comments

Comments
 (0)