phpcs.xsd 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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:complexType>
  12. </xs:element>
  13. <xs:element name="file" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element>
  14. <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  15. <xs:element name="arg" maxOccurs="unbounded" minOccurs="0">
  16. <xs:complexType>
  17. <xs:attribute name="name" type="xs:string"></xs:attribute>
  18. <xs:attribute name="value" type="xs:string"></xs:attribute>
  19. </xs:complexType>
  20. </xs:element>
  21. <xs:element name="ini" maxOccurs="unbounded" minOccurs="0">
  22. <xs:complexType>
  23. <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
  24. <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
  25. </xs:complexType>
  26. </xs:element>
  27. <xs:element name="autoload" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element>
  28. <xs:element name="rule" type="ruleType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  29. </xs:choice>
  30. <xs:attribute name="name" type="xs:string"></xs:attribute>
  31. <xs:attribute name="namespace" type="xs:string"></xs:attribute>
  32. </xs:complexType>
  33. </xs:element>
  34. <xs:complexType name="ruleType">
  35. <xs:choice minOccurs="0" maxOccurs="unbounded">
  36. <xs:element name="exclude" maxOccurs="unbounded" minOccurs="0">
  37. <xs:complexType>
  38. <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
  39. </xs:complexType>
  40. </xs:element>
  41. <xs:element name="message" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element>
  42. <xs:element name="severity" type="xs:integer" maxOccurs="1" minOccurs="0"></xs:element>
  43. <xs:element name="type" maxOccurs="1" minOccurs="0">
  44. <xs:simpleType>
  45. <xs:restriction base="xs:string">
  46. <xs:enumeration value="error"></xs:enumeration>
  47. <xs:enumeration value="warning"></xs:enumeration>
  48. </xs:restriction>
  49. </xs:simpleType>
  50. </xs:element>
  51. <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  52. <xs:element name="include-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element>
  53. <xs:element name="properties" type="propertiesType" maxOccurs="1" minOccurs="0"></xs:element>
  54. </xs:choice>
  55. <xs:attribute name="ref" type="xs:string" use="required"></xs:attribute>
  56. </xs:complexType>
  57. <xs:complexType name="patternType">
  58. <xs:simpleContent>
  59. <xs:extension base="xs:string">
  60. <xs:attribute name="type">
  61. <xs:simpleType>
  62. <xs:restriction base="xs:string">
  63. <xs:enumeration value="relative"></xs:enumeration>
  64. </xs:restriction>
  65. </xs:simpleType>
  66. </xs:attribute>
  67. </xs:extension>
  68. </xs:simpleContent>
  69. </xs:complexType>
  70. <xs:complexType name="propertiesType">
  71. <xs:sequence>
  72. <xs:element name="property" maxOccurs="unbounded" minOccurs="1">
  73. <xs:complexType>
  74. <xs:attribute name="type">
  75. <xs:simpleType>
  76. <xs:restriction base="xs:string">
  77. <xs:enumeration value="array"></xs:enumeration>
  78. </xs:restriction>
  79. </xs:simpleType>
  80. </xs:attribute>
  81. <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
  82. <xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
  83. </xs:complexType>
  84. </xs:element>
  85. </xs:sequence>
  86. </xs:complexType>
  87. </xs:schema>