florath/rmtoo

View on GitHub

Showing 177 of 177 total issues

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

def main_impl(args, mstdout, mstderr, local_main_func=main_func,
Severity: Minor
Found in rmtoo/lib/main/NormalizeDependencies.py - About 35 mins to fix

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

        def inc_stats(result_vec, start_date, idx, invented_on, today, efe):
    Severity: Minor
    Found in rmtoo/lib/Statistics.py - About 35 mins to fix

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

      def main(args, mstdout, mstderr, main_func=main_impl, exitfun=sys.exit):
      Severity: Minor
      Found in rmtoo/gui1/view_only2.py - About 35 mins to fix

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

        def main(args, mstdout, mstderr, main_func=main_impl, exitfun=sys.exit):
        Severity: Minor
        Found in rmtoo/gui1/view_only.py - About 35 mins to fix

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

          def main_impl(args, mstdout, mstderr, mainfunc=main_func, exitfun=sys.exit):
          Severity: Minor
          Found in rmtoo/lib/RmtooMain.py - About 35 mins to fix

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

                def __read_one_element(self, fileinfo, input_mods, object_cache,
            Severity: Minor
            Found in rmtoo/lib/RequirementSet.py - About 35 mins to fix

              Function create_from_dict has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def create_from_dict(self, digraph_as_dict, node_gen_func=Node):
                      """Low level creation method, which really does the job of
                      converting a given dictionary to a digraph.
                      """
                      # First run: create all nodes
              Severity: Minor
              Found in rmtoo/lib/digraph/Digraph.py - About 35 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 rewrite has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def rewrite(reqset):
                      """Do a DFS and compute the priority during that way.
                      If there is a node which was already visited, only recompute the
                      subtree, if the new priority is higher.
                      """
              Severity: Minor
              Found in rmtoo/inputs/RDepPriority.py - About 35 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

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

                      if row[5] in dep_costs:
                          acosts = dep_costs[row[5]]
              Severity: Minor
              Found in rmtoo/lib/main/PricingGraph.py and 1 other location - About 35 mins to fix
              rmtoo/lib/main/PricingGraph.py on lines 76..77

              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 33.

              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 req.is_value_available("Rationale") \
                              and req.get_value("Rationale") is not None:
                          out_fd.write(
                              u'<dt><span class="dlt_rationale">Rationale</span>'
                              '</dt><dd><span class="dlv_rationale">%s</span></dd>'
              Severity: Minor
              Found in rmtoo/outputs/html.py and 1 other location - About 35 mins to fix
              rmtoo/outputs/html.py on lines 128..130

              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 33.

              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

                      out_fd.write(u'<dt><span class="dlt_description">Description</span>'
                                   '</dt><dd><span class="dlv_description">%s</span></dd>' %
                                   self.__markup.replace(req.get_value("Description")
              Severity: Minor
              Found in rmtoo/outputs/html.py and 1 other location - About 35 mins to fix
              rmtoo/outputs/html.py on lines 133..138

              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 33.

              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 row[0] in dep_costs:
                          dcosts = dep_costs[row[0]]
              Severity: Minor
              Found in rmtoo/lib/main/PricingGraph.py and 1 other location - About 35 mins to fix
              rmtoo/lib/main/PricingGraph.py on lines 89..90

              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 33.

              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 requirement_set_pre(self, rset):
                      '''Prepare the requirements set output.'''
                      self.__ce3set = rset.get_ce3set()
                      self.__testcases = rset.get_testcases()
              Severity: Minor
              Found in rmtoo/outputs/latex2.py and 1 other location - About 30 mins to fix
              rmtoo/outputs/LatexJinja2.py on lines 200..203

              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 32.

              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

              Avoid too many return statements within this function.
              Open

                  return True
              Severity: Major
              Found in rmtoo/lib/RmtooMain.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return None
                Severity: Major
                Found in rmtoo/gui1/view_only2.py - About 30 mins to fix

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

                      def requirement_set_pre(self, rset):
                          '''Prepare the requirements set output.'''
                          self.__ce3set = rset.get_ce3set()
                          self.__testcases = rset.get_testcases()
                  Severity: Minor
                  Found in rmtoo/outputs/LatexJinja2.py and 1 other location - About 30 mins to fix
                  rmtoo/outputs/latex2.py on lines 182..185

                  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 32.

                  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

                          sprios_finished = sorted(
                              prios_finished, key=lambda x: x.get_value("Status").get_date_str(),
                  Severity: Minor
                  Found in rmtoo/outputs/prios.py and 1 other location - About 30 mins to fix
                  rmtoo/outputs/prios.py on lines 92..93

                  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 32.

                  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

                          tc = odf.table.TableCell(
                              valuetype="string",
                              formula="oooc:=[Deps.%s2]" % self.__sscoords[i])
                  Severity: Minor
                  Found in rmtoo/outputs/oopricing1.py and 1 other location - About 30 mins to fix
                  rmtoo/outputs/oopricing1.py on lines 727..729

                  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 32.

                  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 rtag == "Text":
                                  FuncCall.pcall(executor, func_prefix + "topic_text",
                                                 tag.get_content())
                                  continue
                  Severity: Minor
                  Found in rmtoo/lib/Topic.py and 1 other location - About 30 mins to fix
                  rmtoo/lib/Topic.py on lines 95..98

                  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 32.

                  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 rtag == "Name":
                                  FuncCall.pcall(executor, func_prefix + "topic_name",
                                                 tag.get_content())
                                  continue
                  Severity: Minor
                  Found in rmtoo/lib/Topic.py and 1 other location - About 30 mins to fix
                  rmtoo/lib/Topic.py on lines 111..114

                  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 32.

                  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