openSUSE/trollolo

View on GitHub

Showing 41 of 41 total issues

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

  def setExtraDays(self):
    if len(self.story_points_extra_days) > 0:
      self.story_points_extra_days = [self.story_points_extra_days[0] - 1] + self.story_points_extra_days
      self.bonus_story_points_done = [0] + self.bonus_story_points_done
    if len(self.tasks_extra_days) > 0:
Severity: Major
Found in scripts/burndowndata.py and 1 other location - About 1 day to fix
scripts/burndowndata.py on lines 118..127

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

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 setUnplannedDays(self):
    if len(self.unplanned_story_points_days) > 0:
      self.unplanned_story_points_days = [self.unplanned_story_points_days[0] - 1] + self.unplanned_story_points_days
      self.unplanned_story_points_done = [0] + self.unplanned_story_points_done
    if len(self.unplanned_tasks_days) > 0:
Severity: Major
Found in scripts/burndowndata.py and 1 other location - About 1 day to fix
scripts/burndowndata.py on lines 107..116

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

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 "unplanned_story_points" in day:
        self.unplanned_story_points_days.append(self.current_day)
        points = day["unplanned_story_points"]["open"] - day["unplanned_story_points"]["total"]
        self.unplanned_story_points_done.append(points)
        self.total_unplanned_story_points.append(day["unplanned_story_points"]["total"])
Severity: Major
Found in scripts/burndowndata.py and 1 other location - About 6 hrs to fix
scripts/burndowndata.py on lines 68..74

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

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 "unplanned_tasks" in day:
        self.unplanned_tasks_days.append(self.current_day)
        tasks = day["unplanned_tasks"]["open"] - day["unplanned_tasks"]["total"]
        self.unplanned_tasks_done.append(tasks)
        self.total_unplanned_tasks.append(day["unplanned_tasks"]["total"])
Severity: Major
Found in scripts/burndowndata.py and 1 other location - About 6 hrs to fix
scripts/burndowndata.py on lines 76..82

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

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

Class ScrumBoard has 37 methods (exceeds 20 allowed). Consider refactoring.
Open

class ScrumBoard

  class DoneColumnNotFoundError < StandardError; end
  class AcceptedColumnNotFoundError < StandardError; end

Severity: Minor
Found in lib/scrum_board.rb - About 4 hrs to fix

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

        if self.draw_bonus_tasks_diff:
          self.y_arrow_start_bonus = graph_data['y_arrow_start_bonus']
          self.y_arrow_end_bonus = graph_data['y_arrow_end_bonus']
          self.y_text_bonus = graph_data['y_text_bonus']
          self.bonus_tasks_day_one = graph_data['bonus_tasks_day_one']
    Severity: Major
    Found in scripts/graph.py and 1 other location - About 2 hrs to fix
    scripts/graph.py on lines 32..36

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

    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 self.draw_tasks_diff:
          self.x_arrow_start_end = graph_data['x_arrow_start_end']
          self.y_arrow_start = graph_data['y_arrow_start']
          self.y_arrow_end = graph_data['y_arrow_end']
          self.y_text = graph_data['y_text']
    Severity: Major
    Found in scripts/graph.py and 1 other location - About 2 hrs to fix
    scripts/graph.py on lines 38..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 58.

    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 drawBars has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

      def drawBars(self, color, color_unplanned):
        if len(self.total) > 1:
          width = 0.2
          offset = 0
          days = self.x
    Severity: Minor
    Found in scripts/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

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

          if "tasks_extra" in day:
            self.tasks_extra_days.append(self.current_day)
            tasks = -day["tasks_extra"]["done"]
            self.bonus_tasks_done.append(tasks)
    Severity: Major
    Found in scripts/burndowndata.py and 1 other location - About 2 hrs to fix
    scripts/burndowndata.py on lines 63..66

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

    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 "story_points_extra" in day:
            self.story_points_extra_days.append(self.current_day)
            points = -day["story_points_extra"]["done"]
            self.bonus_story_points_done.append(points)
    Severity: Major
    Found in scripts/burndowndata.py and 1 other location - About 2 hrs to fix
    scripts/burndowndata.py on lines 58..61

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

    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

    Class Card has 22 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class Card
      # Assuming we have card titles as follows '(8) This is the card name'
      ESTIMATED_REGEX     = /\(([\d.]+)\)/
      SPRINT_NUMBER_REGEX = /\ASprint (\d+)/
    
    
    Severity: Minor
    Found in lib/card.rb - About 2 hrs to fix

      Class BurndownChart has 22 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class BurndownChart
      
        attr_accessor :data
      
        def initialize(settings)
      Severity: Minor
      Found in lib/burndown_chart.rb - About 2 hrs to fix

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

              self.subplot.annotate("",
                xy=(self.x_arrow_start_end, self.y_arrow_start_bonus), xycoords='data',
                xytext=(self.x_arrow_start_end, self.y_arrow_end_bonus), textcoords='data',
                arrowprops=dict(arrowstyle="<|-|>", connectionstyle="arc3", color=color)
        Severity: Major
        Found in scripts/graph.py and 1 other location - About 2 hrs to fix
        scripts/graph.py on lines 112..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 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

              self.subplot.annotate("",
                xy=(self.x_arrow_start_end, self.y_arrow_start), xycoords='data',
                xytext=(self.x_arrow_start_end, self.y_arrow_end), textcoords='data',
                arrowprops=dict(arrowstyle="<|-|>", connectionstyle="arc3", color=color)
        Severity: Major
        Found in scripts/graph.py and 1 other location - About 2 hrs to fix
        scripts/graph.py on lines 125..128

        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

        Consider simplifying this complex logical expression.
        Open

              if @config
                @developer_public_key       = @config['developer_public_key']
                @member_token               = @config['member_token']
                @board_aliases              = @config['board_aliases'] || {}
                @scrum                      = OpenStruct.new(@config['scrum'] || scrum_defaults)
        Severity: Critical
        Found in lib/settings.rb - About 2 hrs to fix

          Method fetch_swimlanes has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
          Open

            def fetch_swimlanes
              @settings.swimlanes.each do |swimlane|
                board.todo_columns.each do |column|
                  column.cards.each do |card|
                    @swimlanes[swimlane].add_todo(card.story_points) if card.label?(swimlane)
          Severity: Minor
          Found in lib/burndown_data.rb - 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 getSprintData has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

            def getSprintData(self, burndown):
              self.sprint_number = burndown["meta"]["sprint"]
              self.weekend_lines = burndown["meta"]["weekend_lines"]
              self.total_days = burndown["meta"]["total_days"]
              self.extra_day = 0
          Severity: Minor
          Found in scripts/burndowndata.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

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

              if 'x_extra' in graph_data:
                self.x_extra = graph_data['x_extra']
                self.y_extra = graph_data['y_extra']
                self.xy_extra = 1
          Severity: Major
          Found in scripts/graph.py and 1 other location - About 1 hr to fix
          scripts/graph.py on lines 27..30

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

          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 'x_unplanned' in graph_data:
                self.x_unplanned = graph_data['x_unplanned']
                self.y_unplanned = graph_data['y_unplanned']
                self.xy_unplanned = 1
          Severity: Major
          Found in scripts/graph.py and 1 other location - About 1 hr to fix
          scripts/graph.py on lines 22..25

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

          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

          Method process_options has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

              def process_options(hash)
                return [] unless hash
                [].tap do |cli_switches|
                  cli_switches << '--no-tasks'                 if hash['no-tasks']
                  cli_switches << '--with-fast-lane'           if hash['with-fast-lane']
          Severity: Minor
          Found in lib/burndown_chart.rb - 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