phpcs.xsd 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
  3. <xs:element name="ruleset">
  4. <xs:complexType>
  5. <xs:choice minOccurs="0" maxOccurs="unbounded">
  6. <xs:element name="description" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
  7. <xs:element name="config" maxOccurs="unbounded" minOccurs="0">
  8. <xs:complexType>
  9. <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
  10. <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
  11. <xs:attributeGroup ref="applySelectively"/>
  12. </xs:complexType>
  13. </xs:element>
  14. <xs:element name="file" maxOccurs="unbounded" minOccurs="0">
  15. <xs:complexType>
  16. <xs:simpleContent>
  17. <xs:extension base="xs:string">
  18. <xs:attributeGroup ref="applySelectively"/>
  19. </xs:extension>
  20. </xs:simpleContent>
  21. </xs:complexType>
  22. </xs:element>
  23. <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  24. <xs:element name="arg" maxOccurs="unbounded" minOccurs="0">
  25. <xs:complexType>
  26. <xs:attribute name="name" type="xs:string"></xs:attribute>
  27. <xs:attribute name="value" type="xs:string"></xs:attribute>
  28. <xs:attributeGroup ref="applySelectively"/>
  29. </xs:complexType>
  30. </xs:element>
  31. <xs:element name="ini" maxOccurs="unbounded" minOccurs="0">
  32. <xs:complexType>
  33. <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
  34. <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
  35. <xs:attributeGroup ref="applySelectively"/>
  36. </xs:complexType>
  37. </xs:element>
  38. <xs:element name="autoload" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element>
  39. <xs:element name="rule" type="ruleType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  40. </xs:choice>
  41. <xs:attribute name="name" type="xs:string"></xs:attribute>
  42. <xs:attribute name="namespace" type="xs:string"></xs:attribute>
  43. </xs:complexType>
  44. </xs:element>
  45. <xs:complexType name="ruleType">
  46. <xs:choice minOccurs="0" maxOccurs="unbounded">
  47. <xs:element name="exclude" maxOccurs="unbounded" minOccurs="0">
  48. <xs:complexType>
  49. <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
  50. <xs:attributeGroup ref="applySelectively"/>
  51. </xs:complexType>
  52. </xs:element>
  53. <xs:element name="message" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
  54. <xs:element name="severity" maxOccurs="1" minOccurs="0">
  55. <xs:complexType>
  56. <xs:simpleContent>
  57. <xs:extension base="xs:integer">
  58. <xs:attributeGroup ref="applySelectively"/>
  59. </xs:extension>
  60. </xs:simpleContent>
  61. </xs:complexType>
  62. </xs:element>
  63. <xs:element name="type" maxOccurs="1" minOccurs="0">
  64. <xs:complexType>
  65. <xs:simpleContent>
  66. <xs:extension base="messageType">
  67. <xs:attributeGroup ref="applySelectively"/>
  68. </xs:extension>
  69. </xs:simpleContent>
  70. </xs:complexType>
  71. </xs:element>
  72. <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  73. <xs:element name="include-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  74. <xs:element name="properties" type="propertiesType" maxOccurs="1" minOccurs="0"></xs:element>
  75. </xs:choice>
  76. <xs:attribute name="ref" type="xs:string" use="required"></xs:attribute>
  77. <xs:attributeGroup ref="applySelectively"/>
  78. </xs:complexType>
  79. <xs:complexType name="patternType">
  80. <xs:simpleContent>
  81. <xs:extension base="xs:string">
  82. <xs:attribute name="type">
  83. <xs:simpleType>
  84. <xs:restriction base="xs:string">
  85. <xs:enumeration value="relative"></xs:enumeration>
  86. </xs:restriction>
  87. </xs:simpleType>
  88. </xs:attribute>
  89. <xs:attributeGroup ref="applySelectively"/>
  90. </xs:extension>
  91. </xs:simpleContent>
  92. </xs:complexType>
  93. <xs:complexType name="propertiesType">
  94. <xs:sequence>
  95. <xs:element name="property" maxOccurs="unbounded" minOccurs="1">
  96. <xs:complexType>
  97. <xs:sequence>
  98. <xs:element name="element" maxOccurs="unbounded" minOccurs="0">
  99. <xs:complexType>
  100. <xs:attribute name="key" type="xs:string"></xs:attribute>
  101. <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
  102. </xs:complexType>
  103. </xs:element>
  104. </xs:sequence>
  105. <xs:attribute name="type">
  106. <xs:simpleType>
  107. <xs:restriction base="xs:string">
  108. <xs:enumeration value="array"></xs:enumeration>
  109. </xs:restriction>
  110. </xs:simpleType>
  111. </xs:attribute>
  112. <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
  113. <xs:attribute name="value" type="xs:string"></xs:attribute>
  114. <xs:attribute name="extend" type="xs:boolean" default="false"/>
  115. <xs:attributeGroup ref="applySelectively"/>
  116. </xs:complexType>
  117. </xs:element>
  118. </xs:sequence>
  119. </xs:complexType>
  120. <xs:simpleType name="messageType">
  121. <xs:restriction base="xs:string">
  122. <xs:enumeration value="error"></xs:enumeration>
  123. <xs:enumeration value="warning"></xs:enumeration>
  124. </xs:restriction>
  125. </xs:simpleType>
  126. <xs:attributeGroup name="applySelectively">
  127. <xs:attribute name="phpcs-only" type="xs:boolean" default="false"/>
  128. <xs:attribute name="phpcbf-only" type="xs:boolean" default="false"/>
  129. </xs:attributeGroup>
  130. </xs:schema>