florath/rmtoo

View on GitHub

Showing 177 of 177 total issues

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

    def __output_latex_one_constraint(self, cname, cnstrt):
        '''Output one constraint.'''
        cname = LatexJinja2.__strescape(cname)
        tracer.debug("Output constraint [%s]." % cname)
        self.__fd.write(u"%% CONSTRAINT '%s'\n" % cname)
Severity: Major
Found in rmtoo/outputs/LatexJinja2.py and 1 other location - About 2 days to fix
rmtoo/outputs/latex2.py on lines 70..102

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

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 __output_latex_one_constraint(self, cname, cnstrt):
        '''Output one constraint.'''
        cname = latex2.__strescape(cname)
        tracer.debug("Output constraint [%s]." % cname)
        self.__fd.write(u"%% CONSTRAINT '%s'\n" % cname)
Severity: Major
Found in rmtoo/outputs/latex2.py and 1 other location - About 2 days to fix
rmtoo/outputs/LatexJinja2.py on lines 83..115

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

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

Severity: Major
Found in rmtoo/outputs/stats_sprint_burndown1.py and 1 other location - About 1 day to fix
rmtoo/outputs/stats_burndown1.py on lines 0..43

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

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

Severity: Major
Found in rmtoo/outputs/stats_burndown1.py and 1 other location - About 1 day to fix
rmtoo/outputs/stats_sprint_burndown1.py on lines 0..44

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

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

class CfgFormatYaml(CfgFormatBase):
    """Handles configuration written in YAML"""

    def create_cfg_from_str(self, url):
        """Create config from YAML string"""
Severity: Major
Found in rmtoo/lib/configuration/Cfg.py and 1 other location - About 1 day to fix
rmtoo/lib/configuration/Cfg.py on lines 80..100

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

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

class CfgFormatJson(CfgFormatBase):
    """Handles configuration written in JSON"""

    def create_cfg_from_str(self, url):
        """Create config from JSON string"""
Severity: Major
Found in rmtoo/lib/configuration/Cfg.py and 1 other location - About 1 day to fix
rmtoo/lib/configuration/Cfg.py on lines 114..134

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

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

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

              if len(req.outgoing) > 0:
                  # Create links to the corresponding dependency nodes.
                  self.__fd.write(u"\n\\textbf{Solved by:} ")
                  # No comma at the end.
                  self.__fd.write(u", ".join(
      Severity: Major
      Found in rmtoo/outputs/latex2.py and 1 other location - About 7 hrs to fix
      rmtoo/outputs/latex2.py on lines 215..224

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

      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) > 0:
                  # Create links to the corresponding labels.
                  self.__fd.write(u"\n\\textbf{Depends on:} ")
                  self.__fd.write(u", ".join(
                      ["\\ref{%s} \\nameref{%s}" %
      Severity: Major
      Found in rmtoo/outputs/latex2.py and 1 other location - About 7 hrs to fix
      rmtoo/outputs/latex2.py on lines 226..236

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

      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.outgoing:
                  # Create links to the corresponding dependency nodes.
                  out_fd.write(u'<dt><span class="dlt_dependent">Dependent'
                               '</span></dt><dd><span class="dlv_dependent">')
                  is_first = True
      Severity: Major
      Found in rmtoo/outputs/html.py and 1 other location - About 7 hrs to fix
      rmtoo/outputs/html.py on lines 148..160

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

      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.incoming:
                  # Create links to the corresponding labels.
                  out_fd.write(u'<dt><span class="dlt_depends_on">Depends on:'
                               '</span></dt><dd><span class="dlv_depends_on">')
                  is_first = True
      Severity: Major
      Found in rmtoo/outputs/html.py and 1 other location - About 7 hrs to fix
      rmtoo/outputs/html.py on lines 162..174

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

      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 execute(self, executor, func_prefix):
              '''Execute the parts which are needed for TopicsContinuumSet.'''
              tracer.debug("Calling pre.")
              FuncCall.pcall(executor, func_prefix + 'topic_continuum_set_pre', self)
              tracer.debug("Calling sub.")
      Severity: Major
      Found in rmtoo/lib/TopicContinuumSet.py and 1 other location - About 6 hrs to fix
      rmtoo/lib/RequirementSet.py on lines 313..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 109.

      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 execute(self, executor, func_prefix):
              '''Execute the parts which are needed for RequirementSet.'''
              tracer.debug("calling pre")
              FuncCall.pcall(executor, func_prefix + "requirement_set_pre", self)
              tracer.debug("calling sub requirement set")
      Severity: Major
      Found in rmtoo/lib/RequirementSet.py and 1 other location - About 6 hrs to fix
      rmtoo/lib/TopicContinuumSet.py on lines 59..70

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

      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

                      for key, val in sorted(iteritems(cnstrt)):
                          refid = LatexJinja2.__strescape(key)
                          refctr = "\\ref{CONSTRAINT%s} \\nameref{CONSTRAINT%s}" \
                                   % (refid, refid)
                          description = val.description()
      Severity: Major
      Found in rmtoo/outputs/LatexJinja2.py and 1 other location - About 6 hrs to fix
      rmtoo/outputs/latex2.py on lines 243..253

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

      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

                      for key, val in sorted(iteritems(cnstrt)):
                          refid = latex2.__strescape(key)
                          refctr = "\\ref{CONSTRAINT%s} \\nameref{CONSTRAINT%s}" \
                                   % (refid, refid)
                          description = val.description()
      Severity: Major
      Found in rmtoo/outputs/latex2.py and 1 other location - About 6 hrs to fix
      rmtoo/outputs/LatexJinja2.py on lines 288..298

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

      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

      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

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

            def __output_latex_constraints(self, constraints):
                '''Write out all constraints for the topic set.'''
                if len(constraints) == 0:
                    tracer.debug("No constraints to output.")
                    return
        Severity: Major
        Found in rmtoo/outputs/latex2.py and 2 other locations - About 5 hrs to fix
        rmtoo/outputs/LatexJinja2.py on lines 117..125
        rmtoo/outputs/latex2.py on lines 142..150

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

        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

            def __output_latex_constraints(self, constraints):
                '''Write out all constraints for the topic set.'''
                if len(constraints) == 0:
                    tracer.debug("No constraints to output.")
                    return
        Severity: Major
        Found in rmtoo/outputs/LatexJinja2.py and 2 other locations - About 5 hrs to fix
        rmtoo/outputs/latex2.py on lines 104..112
        rmtoo/outputs/latex2.py on lines 142..150

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

        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