radar-parlamentar/radar

View on GitHub
radar_parlamentar/importadores/chefes_executivos.py

Summary

Maintainability
A
35 mins
Test Coverage

Function criar_chefe_executivo has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def criar_chefe_executivo(self, nome,
Severity: Minor
Found in radar_parlamentar/importadores/chefes_executivos.py - About 35 mins to fix

    Remove the code after this "return".
    Open

                    return True

    Jump statements (return, break, continue, and raise) move control flow out of the current code block. Typically, any statements in a block that come after a jump are simply wasted keystrokes lying in wait to confuse the unwary.

    Noncompliant Code Example

    def fun(a):
      i = 10
      return i + a       # Noncompliant
      i += 1             # this is never executed
    

    Compliant Solution

    def fun(a):
      i = 10
      return i + a
    

    See

    • MISRA C:2004, 14.1 - There shall be no unreachable code
    • MISRA C++:2008, 0-1-1 - A project shall not contain unreachable code
    • MISRA C++:2008, 0-1-9 - There shall be no dead code
    • MISRA C:2012, 2.1 - A project shall not contain unreachable code
    • MISRA C:2012, 2.2 - There shall be no dead code
    • MITRE, CWE-561 - Dead Code
    • CERT, MSC56-J. - Detect and remove superfluous code and values
    • CERT, MSC12-C. - Detect and remove code that has no effect or is never executed
    • CERT, MSC07-CPP. - Detect and remove dead code

    There are no issues that match your filters.

    Category
    Status