florath/rmtoo

View on GitHub

Showing 177 of 177 total issues

Html has 25 functions (exceeds 20 allowed). Consider refactoring.
Open

class Html(ExecutorTopicContinuum, CreateMakeDependencies):
    """HTML output module"""

    def __init__(self, oconfig):
        '''Create a graph output object.'''
Severity: Minor
Found in rmtoo/outputs/html.py - About 2 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if len(req.outgoing) > HotSpot.max_outgoing:
                self.add_result(
                    Result("HotSpot", req.get_id(), -10,
                           ["Number of outgoing links is too high: %d" %
                            len(req.outgoing)]))
    Severity: Major
    Found in rmtoo/lib/analytics/HotSpot.py and 1 other location - About 2 hrs to fix
    rmtoo/lib/analytics/HotSpot.py on lines 30..35

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if len(req.incoming) > HotSpot.max_incoming:
                self.add_result(
                    Result("HotSpot", req.get_id(), -10,
                           ["Number of incoming links is too high: %d" %
                            len(req.incoming)]))
    Severity: Major
    Found in rmtoo/lib/analytics/HotSpot.py and 1 other location - About 2 hrs to fix
    rmtoo/lib/analytics/HotSpot.py on lines 37..42

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 59.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function output_req has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        def output_req(self, req, doc, sobj):
            # Create the req element
            req_xml = doc.createElement("requirement")
            sobj.appendChild(req_xml)
    
    
    Severity: Minor
    Found in rmtoo/outputs/xml1.py - About 2 hrs 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 strongly_connected_components has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    def strongly_connected_components(digraph):
        """This algorithm is based upon a depth first search.  It assigns a
        number to each visited node.
        """
        # This is the number the next node is assigned. (There is no other
    Severity: Minor
    Found in rmtoo/lib/digraph/StronglyConnectedComponents.py - About 2 hrs 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 node_attributes has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

        def node_attributes(req, config=default_config):
    
            def get_conf_attr(attr):
                return config.is_available("node_attributes") \
                    and attr in config.get_value("node_attributes")
    Severity: Minor
    Found in rmtoo/outputs/graph.py - About 2 hrs 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

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        def __add_requirements(self, model, iter, node):
            liter = model.append(iter)
            model.set(liter, 0, node.get_id())
            for n in node.outgoing:
                self.__add_requirements(model, liter, n)
    Severity: Major
    Found in rmtoo/gui1/view_only.py and 1 other location - About 2 hrs to fix
    rmtoo/gui1/view_only2.py on lines 219..223

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        def __add_requirements(self, model, iter, node):
            liter = model.append(iter)
            model.set(liter, 0, node.get_id())
            for n in node.outgoing:
                self.__add_requirements(model, liter, n)
    Severity: Major
    Found in rmtoo/gui1/view_only2.py and 1 other location - About 2 hrs to fix
    rmtoo/gui1/view_only.py on lines 37..41

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File latex2.py has 262 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    '''
     rmtoo
       Free and Open Source Requirements Management Tool
    
     LaTeX output class version 2.
    Severity: Minor
    Found in rmtoo/outputs/latex2.py - About 2 hrs to fix

      File LatexJinja2.py has 261 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      '''
       rmtoo
         Free and Open Source Requirements Management Tool
      
       LaTeX output with jinja templating engine.
      Severity: Minor
      Found in rmtoo/outputs/LatexJinja2.py - About 2 hrs to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                dc = odf.draw.Control(control="lbcompliant%s" % req.name,
                                      zindex="0",
                                      x="0.0in",
                                      y="0.0in",
                                      endcelladdress="Costs.C%d" % (choi + 1),
        Severity: Major
        Found in rmtoo/outputs/oopricing1.py and 1 other location - About 2 hrs to fix
        rmtoo/outputs/oopricing1.py on lines 490..494

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 53.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    dc = odf.draw.Control(control="lbdependentfrom%s" % req.name,
                                          zindex="0",
                                          x="0.0in",
                                          y="0.0in",
                                          endcelladdress="Costs.H%d" % (choi + 1),
        Severity: Major
        Found in rmtoo/outputs/oopricing1.py and 1 other location - About 2 hrs to fix
        rmtoo/outputs/oopricing1.py on lines 468..472

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 53.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            @staticmethod
            def create_empty_currency_cell_ro(row):
                tc = odf.table.TableCell(
                    valuetype="currency", currency="EUR",
                    stylename="col-euro")
        Severity: Major
        Found in rmtoo/outputs/oopricing1.py and 2 other locations - About 2 hrs to fix
        rmtoo/outputs/oopricing1.py on lines 327..333
        rmtoo/outputs/oopricing1.py on lines 343..349

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 53.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            @staticmethod
            def create_empty_int_cell(row):
                tc = odf.table.TableCell(
                    valuetype="float", value="0",
                    stylename="col-int-rw")
        Severity: Major
        Found in rmtoo/outputs/oopricing1.py and 2 other locations - About 2 hrs to fix
        rmtoo/outputs/oopricing1.py on lines 327..333
        rmtoo/outputs/oopricing1.py on lines 335..341

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 53.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            @staticmethod
            def create_empty_currency_cell(row):
                tc = odf.table.TableCell(
                    valuetype="currency", currency="EUR",
                    stylename="col-euro-rw")
        Severity: Major
        Found in rmtoo/outputs/oopricing1.py and 2 other locations - About 2 hrs to fix
        rmtoo/outputs/oopricing1.py on lines 335..341
        rmtoo/outputs/oopricing1.py on lines 343..349

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 53.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

            def cmad_topic_continuum_pre(self, _):
                '''Write out the one and only dependency to all the requirements.'''
                tracer.debug("Called.")
                CreateMakeDependencies.write_reqs_dep(self._cmad_file,
                                                      self._output_filename)
        Severity: Major
        Found in rmtoo/outputs/latex2.py and 1 other location - About 2 hrs to fix
        rmtoo/outputs/LatexJinja2.py on lines 311..317

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 52.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

            def cmad_topic_continuum_pre(self, _):
                '''Write out the one and only dependency to all the requirements.'''
                tracer.debug("Called.")
                CreateMakeDependencies.write_reqs_dep(self._cmad_file,
                                                      self._output_filename)
        Severity: Major
        Found in rmtoo/outputs/LatexJinja2.py and 1 other location - About 2 hrs to fix
        rmtoo/outputs/latex2.py on lines 318..323

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 52.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        File html.py has 255 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        '''
         rmtoo
           Free and Open Source Requirements Management Tool
        
         HTML output class.
        Severity: Minor
        Found in rmtoo/outputs/html.py - About 2 hrs to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          def xml_check_name(xml_doc_a, xml_doc_b, xpath):
              '''Check for the name.'''
              if xml_doc_a.tagName != xml_doc_b.tagName:
                  return False, "Tag names differ [%s] != [%s] at [%s]" % \
                      (xml_doc_a.tagName, xml_doc_b.tagName, xpath)
          Severity: Major
          Found in rmtoo/lib/xmlutils/xmlcmp.py and 1 other location - About 2 hrs to fix
          rmtoo/lib/xmlutils/xmlcmp.py on lines 48..53

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 51.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          def xml_check_type(xml_doc_a, xml_doc_b, xpath):
              '''Check for the type.'''
              if xml_doc_a.nodeType != xml_doc_b.nodeType:
                  return False, "Node types differ [%s] != [%s] at [%s]" % \
                      (xml_doc_a.nodeType, xml_doc_b.nodeType, xpath)
          Severity: Major
          Found in rmtoo/lib/xmlutils/xmlcmp.py and 1 other location - About 2 hrs to fix
          rmtoo/lib/xmlutils/xmlcmp.py on lines 67..72

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 51.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language