haazime/kanban_core_extension

View on GitHub

Showing 15 of 16 total issues

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

  class Description
    attr_reader :summary, :detail

    def initialize(summary, detail)
      @summary = summary
Severity: Minor
Found in domain/feature/description.rb and 1 other location - About 35 mins to fix
domain/project/description.rb on lines 2..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 36.

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 Description
    attr_reader :name, :goal

    def initialize(name, goal)
      @name = name
Severity: Minor
Found in domain/project/description.rb and 1 other location - About 35 mins to fix
domain/feature/description.rb on lines 2..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 36.

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 7 locations. Consider refactoring.
Open

  def create
    @command = ChangeWipLimitCommand.new(command_params)
    if @command.execute(wip_limit_service)
      flash[:notice] = 'WIP制限の値を変更しました。'
      render 'redirect_from_modal', locals: { to: board_url(@command.project_id_str) }
Severity: Major
Found in app/controllers/wip_limit_changings_controller.rb and 6 other locations - About 25 mins to fix
app/controllers/phase_spec_addings_controller.rb on lines 12..19
app/controllers/phase_spec_removings_controller.rb on lines 11..18
app/controllers/state_addings_controller.rb on lines 13..20
app/controllers/state_removings_controller.rb on lines 12..19
app/controllers/transition_settings_controller.rb on lines 12..19
app/controllers/wip_limit_disablements_controller.rb on lines 11..18

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

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 7 locations. Consider refactoring.
Open

  def create
    @command = AddPhaseSpecCommand.new(command_params)
    if @command.execute(workflow_service)
      flash[:notice] = 'ワークフローにフェーズを追加しました。'
      render 'redirect_from_modal', locals: { to: board_url(@command.project_id_str) }
Severity: Major
Found in app/controllers/phase_spec_addings_controller.rb and 6 other locations - About 25 mins to fix
app/controllers/phase_spec_removings_controller.rb on lines 11..18
app/controllers/state_addings_controller.rb on lines 13..20
app/controllers/state_removings_controller.rb on lines 12..19
app/controllers/transition_settings_controller.rb on lines 12..19
app/controllers/wip_limit_changings_controller.rb on lines 11..18
app/controllers/wip_limit_disablements_controller.rb on lines 11..18

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

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 7 locations. Consider refactoring.
Open

  def create
    @command = RemovePhaseSpecCommand.new(command_params)
    if @command.execute(workflow_service)
      flash[:notice] = 'フェーズを削除しました。'
      render 'redirect_from_modal', locals: { to: board_url(@command.project_id_str) }
Severity: Major
Found in app/controllers/phase_spec_removings_controller.rb and 6 other locations - About 25 mins to fix
app/controllers/phase_spec_addings_controller.rb on lines 12..19
app/controllers/state_addings_controller.rb on lines 13..20
app/controllers/state_removings_controller.rb on lines 12..19
app/controllers/transition_settings_controller.rb on lines 12..19
app/controllers/wip_limit_changings_controller.rb on lines 11..18
app/controllers/wip_limit_disablements_controller.rb on lines 11..18

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

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 7 locations. Consider refactoring.
Open

  def create
    @command = SetTransitionCommand.new(command_params)
    if @command.execute(phase_spec_service)
      flash[:notice] = 'フェーズに推移を設定しました。'
      render 'redirect_from_modal', locals: { to: board_url(@command.project_id_str) }
Severity: Major
Found in app/controllers/transition_settings_controller.rb and 6 other locations - About 25 mins to fix
app/controllers/phase_spec_addings_controller.rb on lines 12..19
app/controllers/phase_spec_removings_controller.rb on lines 11..18
app/controllers/state_addings_controller.rb on lines 13..20
app/controllers/state_removings_controller.rb on lines 12..19
app/controllers/wip_limit_changings_controller.rb on lines 11..18
app/controllers/wip_limit_disablements_controller.rb on lines 11..18

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

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 7 locations. Consider refactoring.
Open

  def create
    @command = RemoveStateCommand.new(command_params)
    if @command.execute(phase_spec_service)
      flash[:notice] = '状態を削除しました。'
      render 'redirect_from_modal', locals: { to: board_url(@command.project_id_str) }
Severity: Major
Found in app/controllers/state_removings_controller.rb and 6 other locations - About 25 mins to fix
app/controllers/phase_spec_addings_controller.rb on lines 12..19
app/controllers/phase_spec_removings_controller.rb on lines 11..18
app/controllers/state_addings_controller.rb on lines 13..20
app/controllers/transition_settings_controller.rb on lines 12..19
app/controllers/wip_limit_changings_controller.rb on lines 11..18
app/controllers/wip_limit_disablements_controller.rb on lines 11..18

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

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 7 locations. Consider refactoring.
Open

  def create
    @command = AddStateCommand.new(command_params)
    if @command.execute(phase_spec_service)
      flash[:notice] = 'フェーズに状態を追加しました。'
      render 'redirect_from_modal', locals: { to: board_url(@command.project_id_str) }
Severity: Major
Found in app/controllers/state_addings_controller.rb and 6 other locations - About 25 mins to fix
app/controllers/phase_spec_addings_controller.rb on lines 12..19
app/controllers/phase_spec_removings_controller.rb on lines 11..18
app/controllers/state_removings_controller.rb on lines 12..19
app/controllers/transition_settings_controller.rb on lines 12..19
app/controllers/wip_limit_changings_controller.rb on lines 11..18
app/controllers/wip_limit_disablements_controller.rb on lines 11..18

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

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 7 locations. Consider refactoring.
Open

  def create
    @command = DisableWipLimitCommand.new(command_params)
    if @command.execute(wip_limit_service)
      flash[:notice] = 'WIP制限を解除しました。'
      render 'redirect_from_modal', locals: { to: board_url(@command.project_id_str) }
Severity: Major
Found in app/controllers/wip_limit_disablements_controller.rb and 6 other locations - About 25 mins to fix
app/controllers/phase_spec_addings_controller.rb on lines 12..19
app/controllers/phase_spec_removings_controller.rb on lines 11..18
app/controllers/state_addings_controller.rb on lines 13..20
app/controllers/state_removings_controller.rb on lines 12..19
app/controllers/transition_settings_controller.rb on lines 12..19
app/controllers/wip_limit_changings_controller.rb on lines 11..18

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

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 ProjectId

    def initialize(id)
      @id = id
    end
Severity: Minor
Found in domain/project/project_id.rb and 1 other location - About 25 mins to fix
domain/activity/phase.rb on lines 2..23

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

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 Phase

    def initialize(name)
      @name = name
    end
Severity: Minor
Found in domain/activity/phase.rb and 1 other location - About 25 mins to fix
domain/project/project_id.rb on lines 2..23

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

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 change(project_id, phase, new_wip_limit)
    project = @project_repository.find(project_id)
    board = @board_repository.find(project_id)

    new_workflow = replace_phase_spec(project, phase) do |current|
Severity: Minor
Found in app/services/wip_limit_service.rb and 1 other location - About 15 mins to fix
app/services/phase_spec_service.rb on lines 40..49

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

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 remove_state(project_id, phase, state)
    project = @project_repository.find(project_id)
    board = @board_repository.find(project_id)

    new_workflow = replace_phase_spec(project, phase) do |current|
Severity: Minor
Found in app/services/phase_spec_service.rb and 1 other location - About 15 mins to fix
app/services/wip_limit_service.rb on lines 9..18

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

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 new
    @command = RemoveStateCommand.new(
      project_id_str: params[:project_id_str],
      phase_name: params[:phase_name],
      state_name: params[:state_name]
Severity: Minor
Found in app/controllers/state_removings_controller.rb and 1 other location - About 15 mins to fix
app/controllers/phase_spec_addings_controller.rb on lines 3..10

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

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 new
    @command = AddPhaseSpecCommand.new(
      project_id_str: params[:project_id_str],
      position: params[:position],
      base_phase_name: params[:base_phase_name]
Severity: Minor
Found in app/controllers/phase_spec_addings_controller.rb and 1 other location - About 15 mins to fix
app/controllers/state_removings_controller.rb on lines 3..10

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

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