maxwu/cistat

View on GitHub
src/cistat/model/xunit_report.py

Summary

Maintainability
B
4 hrs
Test Coverage

Xunitrpt has 28 functions (exceeds 20 allowed). Consider refactoring.
Open

class Xunitrpt(object):
    """ The XUnit Test Report Class.
    Which represents an XML file as a test report in XUnit format.
    The XSD refers to below document:
    https://github.com/apache/maven-surefire/blob/master/maven-surefire-plugin/src/site/resources/xsd/surefire-test-report.xsd
Severity: Minor
Found in src/cistat/model/xunit_report.py - About 3 hrs to fix

    Function accumulate_xunit_str has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def accumulate_xunit_str(self, xunit=None):
            """ Update data in given XUnit str to current XUnitReport Object
            If supplied with malformed str or None, silently do nothing but return itself.
            :param xunit: XUnit in a string
            :return: XunitReport Object itself after the accumulation
    Severity: Minor
    Found in src/cistat/model/xunit_report.py - About 55 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    There are no issues that match your filters.

    Category
    Status