florath/rmtoo

View on GitHub

Showing 66 of 177 total issues

File oopricing1.py has 553 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#  -*- coding: utf-8 -*-
'''
 rmtoo
   Free and Open Source Requirements Management Tool

Severity: Major
Found in rmtoo/outputs/oopricing1.py - About 1 day to fix

    Function topic_set_pre has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
    Open

        def topic_set_pre(self, topic_set):
            '''This is call in the TopicSet pre-phase.'''
            prios_impl, prios_detail, prios_selected, \
                prios_assigned, prios_finished = \
                self.__get_reqs_impl_detail(topic_set)
    Severity: Minor
    Found in rmtoo/outputs/prios.py - About 1 day 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

    File RequirementSet.py has 475 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    '''
     rmtoo
       Free and Open Source Requirements Management Tool
    
      Collection of topics.
    Severity: Minor
    Found in rmtoo/lib/RequirementSet.py - About 7 hrs to fix

      RequirementSet has 44 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class RequirementSet(Digraph, UsableFlag):
          '''A RequirementSet holds one DAG (directed acyclic graph)
             of requirements.'''
      
          def __init__(self, config):
      Severity: Minor
      Found in rmtoo/lib/RequirementSet.py - About 6 hrs to fix

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

            def requirement(self, req):
                '''Write out one requirement.'''
                self.__fd.write(u"%% REQ '%s'\n" % req.get_id())
        
                self.__fd.write(u"\\%s{%s}\\label{%s}\n\\textbf{Description:} %s\n"
        Severity: Minor
        Found in rmtoo/outputs/latex2.py - About 4 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

        oopricing1 has 33 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class oopricing1(StdOutputParams, ExecutorTopicContinuum,
                         CreateMakeDependencies):
        
            def __setup_coord_lookup(self):
                '''Because at some points a requirement will be rendered in a row
        Severity: Minor
        Found in rmtoo/outputs/oopricing1.py - About 4 hrs to fix

          Function _get_requirement has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              def _get_requirement(self, req):
                  '''Write out one requirement.'''
                  req_template = self._template_env.get_template("singleReq.tex")
                  template_vars = (
                      {'req_id': self.__strescape(req.get_id()),
          Severity: Minor
          Found in rmtoo/outputs/LatexJinja2.py - About 3 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 get_units_generic has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_units_generic(rset, start_date, end_date, skip_requirement):
                  """Run through the requirements and count the not done
                  depending on the date.
                  """
                  result_vec = Statistics.prepare_result_vector(start_date, end_date)
          Severity: Minor
          Found in rmtoo/lib/Statistics.py - About 3 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

          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

            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

            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

                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

                  Function output_html_topic_output_content has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def output_html_topic_output_content(self, fd, topic):
                          # Subtopics go in a ul
                          ul_open = False
                          for t in topic.get_tags():
                              tag = t.get_tag()
                  Severity: Minor
                  Found in rmtoo/outputs/html.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 requirement has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def requirement(self, req):
                          '''Output one requirement.'''
                          out_fd = self.__fd_stack[-1]
                          level = len(self.__fd_stack)
                  
                  
                  Severity: Minor
                  Found in rmtoo/outputs/html.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 unite has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def unite(self, oce3s):
                          """Try to unite all given ce3s into the local ce3"""
                          okeys = set()
                          for oce in oce3s:
                              okeys = okeys.union(set(oce.keys()))
                  Severity: Minor
                  Found in rmtoo/lib/CE3.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 main has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def main():
                      """The main function for the pricing graph"""
                      csvfilename, graphfilename = parse_argv()
                  
                      # The files must be saved according to this rules:
                  Severity: Minor
                  Found in rmtoo/lib/main/PricingGraph.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 __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

                  Severity
                  Category
                  Status
                  Source
                  Language