florath/rmtoo

View on GitHub

Showing 66 of 177 total issues

Function __get_reqs_impl_detail has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def __get_reqs_impl_detail(self, topic_set):
        '''Return the implementation details of the requirements.'''
        prios_impl = []
        prios_detail = []
        prios_selected = []
Severity: Minor
Found in rmtoo/outputs/prios.py - About 1 hr 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

Function rewrite has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def rewrite(self, rid, req):
        """This tag is mandatory - but might be empty"""
        if self.get_tag() not in req:
            return "Factor", 0.0
        # Compute the priority.  This is done by adding the simple
Severity: Minor
Found in rmtoo/inputs/ReqPriority.py - About 1 hr 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

Function __create_local_ce3s has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    def __create_local_ce3s(self):
        '''Create the local Constraint Execution Environments
           and evaluate the given statements.
           This method does two things:
           - evaluating the constraints in the CE3
Severity: Minor
Found in rmtoo/lib/RequirementSet.py - About 1 hr 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

Function split_next_record has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    def split_next_record(split_lines, rid, lineno, _mls):
        '''Splits off the first record from the given string list.
        The record is returned and the string list is shortened.
        Precondition: it can be assumed that len(sl)>0
        '''
Severity: Minor
Found in rmtoo/lib/storagebackend/txtfile/TxtParser.py - About 1 hr 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

Function create_costs_content_req has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def create_costs_content_req(self, tr, req, i):
        choi = i + DEPS_HEADER_LEN
        # First cell is the id
        self.create_text_cell(tr, req.name)
        # Second cell is the name
Severity: Minor
Found in rmtoo/outputs/oopricing1.py - About 1 hr to fix

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

    def xml_check_children(xml_doc_a, xml_doc_b, xpath):
        '''Create a shallow copy of b's children (and remove nodes which
           are seen as equal).'''
        bcn = []
        for child in xml_doc_b.childNodes:
    Severity: Minor
    Found in rmtoo/lib/xmlutils/xmlcmp.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

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

        def execute(self, executor, func_prefix):
            '''Execute the parts which are needed for TopicsContinuum.'''
            tracer.debug("Calling pre [%s]", self.name)
            FuncCall.pcall(executor, func_prefix + "topic_pre", self)
            tracer.debug("Calling sub [%s]", self.name)
    Severity: Minor
    Found in rmtoo/lib/Topic.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

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

        def create_deps_dependent(self, sheet, sreqs):
            # The number of the following rows depend on the maximum
            # number of incoming requirements.
            # This flags if there is something found with the current
            # index.
    Severity: Minor
    Found in rmtoo/outputs/oopricing1.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

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

        def create_one_sums_sheet(self, calcdoc, sreqs, name, colname):
            sheet = odf.table.Table(name=name, protected="true")
            self.create_reqs_ids_row(sheet, sreqs)
    
            i = 0
    Severity: Minor
    Found in rmtoo/outputs/oopricing1.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

    Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, tbhtags, content, rid, mods, config, type_str,
    Severity: Major
    Found in rmtoo/lib/BaseRMObject.py - About 50 mins to fix

      Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self, digraph, config, input_handler, commit, file_info,
      Severity: Minor
      Found in rmtoo/lib/Topic.py - About 45 mins to fix

        Function merge has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        def merge(orig_dict, new_dict):
            """Copies all the values from the new_dict into the
            orig_dict.  If a value already exists, it is overwritten."""
            assert isinstance(orig_dict, dict)
            assert isinstance(new_dict, dict)
        Severity: Minor
        Found in rmtoo/lib/configuration/DictHelper.py - About 45 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

        Function requirement has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def requirement(self, req):
                '''Output the given requirement.'''
                # There is the need for a unique numeric id
                xml_task = self.__xml_doc.createElement("task")
                xml_task.setAttribute("name", req.get_id())
        Severity: Minor
        Found in rmtoo/outputs/xml_ganttproject_2.py - About 45 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

        Function handle_modules_tag has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def handle_modules_tag(self, reqs):
                """Process all the modules"""
                if self.mods is None:
                    return
        
        
        Severity: Minor
        Found in rmtoo/lib/BaseRMObject.py - About 45 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

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

                def output_statistics(name, simpl, sselected, sdetail,
        Severity: Minor
        Found in rmtoo/outputs/prios.py - About 35 mins to fix

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

              def __init__(self, content, rid, file_path, mods, config):
          Severity: Minor
          Found in rmtoo/lib/Constraint.py - About 35 mins to fix

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

                def __init__(self, content, rid, file_path, mods, config):
            Severity: Minor
            Found in rmtoo/lib/Requirement.py - About 35 mins to fix

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

                  def __init__(self, content, rid, file_path, mods, config):
              Severity: Minor
              Found in rmtoo/lib/TestCase.py - About 35 mins to fix

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

                    def __init__(self, ts_name, config, ts_config, object_cache, input_mods):
                Severity: Minor
                Found in rmtoo/lib/TopicContinuum.py - About 35 mins to fix

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

                      def __read(self, tname, input_handler, commit, file_info, req_set):
                  Severity: Minor
                  Found in rmtoo/lib/Topic.py - About 35 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language