Menu

#322 Change the complexity algorithm

v1.1.x
fixed
None
v1.1.0
Bug Fix
2018-04-26
2018-04-23
Erik Hänel
No

See https://blog.holisticon.de/2011/05/softwaremetriken-zyklomatische-komplexitat/

Analysis:
This is a quick fix to be done in the function NumeReEditor::calculateCyclomaticComplexity(), where one has to add the check for the operators.

Implementation:
The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.

Documentation:
The fix was documented in the changes log. The changed behavior was documented in the documentation article concerning the code analyzer.

Tests:
The fix was tested manually. The complexity now also recognizes the binary logical operators and the logical functions and(), or() and xor(). Bug fix implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2018-04-24
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-04-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     See https://blog.holisticon.de/2011/05/softwaremetriken-zyklomatische-komplexitat/
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-04-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,7 @@
     See https://blog.holisticon.de/2011/05/softwaremetriken-zyklomatische-komplexitat/
    
     **Analysis:**
    +This is a quick fix to be done in the function `NumeReEditor::calculateCyclomaticComplexity()`, where one has to add the check for the operators.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-04-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,9 @@
     This is a quick fix to be done in the function `NumeReEditor::calculateCyclomaticComplexity()`, where one has to add the check for the operators.
    
     **Implementation:**
    +The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.
    
     **Documentation:**
    +The fix was documented in the changes log. The changed behavior was documented in the documentation article concerning the code analyzer.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2018-04-26
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,3 +10,4 @@
     The fix was documented in the changes log. The changed behavior was documented in the documentation article concerning the code analyzer.
    
     **Tests:**
    +The fix was tested manually. The complexity now also recognizes the binary logical operators and the logical functions `and()`, `or()` and `xor()`. Bug fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB