Portable information exchange format

QScored follows and provides a portable information exchange format for code quality analysis reports. Any XML uploaded to QScored is validated over this schema. Any tool complying to this output format will be acceptable to QScored.

        <?xml version="1.0" encoding="UTF-8" ?>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
                <xs:element name="Analysis" type="Designite_info"/>
                <xs:complexType name="Designite_info">
                    <xs:sequence>
                        <xs:element name="Solution" type="Solution_info" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                    <xs:attribute name="Version" type="xs:string" use="required"/>
                    <xs:attribute name="Date" use="required"/>
                    <xs:attribute name="Tool" use="required"/>
                    <xs:attribute name="Language" use="required">
                        <xs:simpleType>
                            <xs:restriction base="xs:string">
                                <xs:enumeration value="cs"/>
                                <xs:enumeration value="java"/>
                            </xs:restriction>
                        </xs:simpleType>
                    </xs:attribute>
                </xs:complexType>

                <xs:complexType name="Solution_info">
                    <xs:sequence>
                        <xs:element name="Name" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="Path" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="LOC" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="ComponentCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TypeCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="MethodCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="SmellDensity" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="CodeDuplication" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="MetricVoilations" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TotalArchSmellCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TotalDesignSmellCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TotalImplSmellCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:sequence minOccurs="1" maxOccurs="unbounded">
                            <xs:element name="Project" type="Project_info"/>
                        </xs:sequence>
                    </xs:sequence>
                </xs:complexType>

                <xs:complexType name="Project_info">
                    <xs:sequence>
                        <xs:element name="Name" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="LOC" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="ComponentCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TypeCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="MethodCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="SmellDensity" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="CodeDuplication" type="xs:decimal" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="MetricVoilations" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TotalArchSmellCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TotalDesignSmellCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="TotalImplSmellCount" type="xs:integer" minOccurs="1" maxOccurs="1"/>
                        <xs:sequence minOccurs="0" maxOccurs="1">
                            <xs:element name="ComponentMetrics" type="ComponentMetrics_info"/>
                        </xs:sequence>
                        <xs:sequence minOccurs="0" maxOccurs="1">
                            <xs:element name="ClassMetrics" type="ClassMetrics_info"/>
                        </xs:sequence>
                        <xs:sequence minOccurs="0" maxOccurs="1">
                            <xs:element name="MethodMetrics" type="MethodMetrics_info"/>
                        </xs:sequence>
                        <xs:sequence minOccurs="0" maxOccurs="1">
                            <xs:element name="DesignSmells" type="DesignSmells_info"/>
                        </xs:sequence>
                        <xs:sequence minOccurs="0" maxOccurs="1">
                            <xs:element name="ImplementationSmells" type="ImplementationSmells_info"/>
                        </xs:sequence>
                        <xs:sequence minOccurs="0" maxOccurs="1">
                            <xs:element name="ArchSmells" type="ArchSmells_info"/>
                        </xs:sequence>
                    </xs:sequence>
                </xs:complexType>

                <xs:complexType name="ComponentMetrics_info">
                    <xs:sequence minOccurs="1" maxOccurs="unbounded">
                        <xs:element name="ComponentMetric" type="ComponentMetric_info"/>
                    </xs:sequence>
                </xs:complexType>

                <xs:complexType name="ClassMetrics_info">
                    <xs:sequence minOccurs="1" maxOccurs="unbounded">
                        <xs:element name="ClassMetric" type="ClassMetric_info"/>
                    </xs:sequence>
                </xs:complexType>
                <xs:complexType name="MethodMetrics_info">
                    <xs:sequence minOccurs="1" maxOccurs="unbounded">
                        <xs:element name="MethodMetric" type="MethodMetric_info"/>
                    </xs:sequence>
                </xs:complexType>
                <xs:complexType name="DesignSmells_info">
                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="DesignSmell" type="DesignSmell_info"/>
                    </xs:sequence>
                </xs:complexType>
                <xs:complexType name="ImplementationSmells_info">
                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="ImplementationSmell" type="ImplementationSmell_info"/>
                    </xs:sequence>
                </xs:complexType>
                <xs:complexType name="ArchSmells_info">
                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="ArchSmell" type="ArchSmell_info"/>
                    </xs:sequence>
                </xs:complexType>

                <xs:complexType name="ComponentMetric_info">
                    <xs:attribute name="Name" type="xs:string" use="required"/>
                    <xs:attribute name="LOC" type="xs:integer" use="required"/>
                    <xs:attribute name="SmellDensity" type="xs:decimal" use="required"/>
                    <xs:attribute name="OutgoingDependencies" type="xs:string" use="required"/>
                </xs:complexType>

                <xs:complexType name="ClassMetric_info">
                    <xs:attribute name="Name" type="xs:string" use="required"/>
                    <xs:attribute name="Component" type="xs:string" use="required"/>
                    <xs:attribute name="DIT" type="xs:integer" use="required"/>
                    <xs:attribute name="FANIN" type="xs:integer" use="required"/>
                    <xs:attribute name="FANOUT" type="xs:integer" use="required"/>
                    <xs:attribute name="LCOM" type="xs:decimal" use="required"/>
                    <xs:attribute name="LOC" type="xs:integer" use="required"/>
                    <xs:attribute name="NC" type="xs:integer" use="required"/>
                    <xs:attribute name="NOF" type="xs:integer" use="required"/>
                    <xs:attribute name="NOM" type="xs:integer" use="required"/>
                    <xs:attribute name="NOP" type="xs:integer" use="required"/>
                    <xs:attribute name="NOPF" type="xs:integer" use="required"/>
                    <xs:attribute name="NOPM" type="xs:integer" use="required"/>
                    <xs:attribute name="WMC" type="xs:integer" use="required"/>
                </xs:complexType>

                <xs:complexType name="MethodMetric_info">
                    <xs:attribute name="Name" type="xs:string" use="required"/>
                    <xs:attribute name="Class" type="xs:string" use="required"/>
                    <xs:attribute name="Component" type="xs:string" use="required"/>
                    <xs:attribute name="CC" type="xs:integer" use="required"/>
                    <xs:attribute name="LOC" type="xs:integer" use="required"/>
                    <xs:attribute name="PC" type="xs:integer" use="required"/>
                </xs:complexType>

                <xs:complexType name="DesignSmell_info">
                    <xs:sequence>
                        <xs:element name="Name" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="Description" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="Entity" minOccurs="1" maxOccurs="1">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="Component" type="myString" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="Class" type="myString" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="File" type="myString" minOccurs="0" maxOccurs="1"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="Key" type="xs:string" use="required"/>
                </xs:complexType>

                <xs:complexType name="ImplementationSmell_info">
                    <xs:sequence>
                        <xs:element name="Name" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="Description" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="Entity" minOccurs="1" maxOccurs="1">
                            <xs:complexType>
                                <xs:all>
                                    <xs:element name="Component" type="myString" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="Class" type="myString" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="File" type="myString" minOccurs="0" maxOccurs="1"/>
                                    <xs:element name="Method" type="xs:string" minOccurs="0" maxOccurs="1"/>
                                </xs:all>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>

                <xs:complexType name="ArchSmell_info">
                    <xs:sequence>
                        <xs:element name="Name" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="Description" type="myString" minOccurs="1" maxOccurs="1"/>
                        <xs:element name="Entity" minOccurs="1" maxOccurs="1">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="Component" type="myString" minOccurs="1" maxOccurs="1"/>
                                    <xs:element name="Project" type="myString" minOccurs="1" maxOccurs="1"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="ResponsibleClasses" type="myString" minOccurs="1" maxOccurs="1"/>
                    </xs:sequence>
                    <xs:attribute name="Key" type="xs:string" use="required"/>
                </xs:complexType>

                <xs:simpleType name="myString">
                    <xs:restriction base="xs:string">
                        <xs:minLength value="1"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:schema>