TracksApp/tracks

View on GitHub

Showing 2,926 of 2,932 total issues

Class has too many lines. [1065/300]
Open

class TodosController < ApplicationController
  skip_before_action :login_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
  prepend_before_action :login_or_feed_token_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
  append_before_action :find_and_activate_ready, :only => [:index, :list_deferred]

Severity: Minor
Found in app/controllers/todos_controller.rb by rubocop

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Module has too many lines. [557/300]
Open

module TodosHelper
  # === helpers for rendering container
  def empty_message_holder(container_name, show, title_param = nil)
    content_tag(:div, :id => "no_todos_in_view", :class => "container #{container_name}", :style => "display:" + (show ? "block" : "none")) do
      content_tag(:h2) { t("todos.no_actions.title", :param => title_param) } +
Severity: Minor
Found in app/helpers/todos_helper.rb by rubocop

This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

File todos_controller.rb has 1067 lines of code (exceeds 300 allowed). Consider refactoring.
Open

class TodosController < ApplicationController
  skip_before_action :login_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
  prepend_before_action :login_or_feed_token_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
  append_before_action :find_and_activate_ready, :only => [:index, :list_deferred]

Severity: Major
Found in app/controllers/todos_controller.rb - About 2 days to fix

    Complex method TodosController#determine_remaining_in_container_count (191.0)
    Open

      def determine_remaining_in_container_count(todo = @todo)
        source_view do |from|
          from.deferred do
            todos_in_container, todos_in_target_container = find_todos_in_container_and_target_container(todo, @todo)
            @remaining_in_context = todos_in_container.deferred_or_blocked.count
    Severity: Minor
    Found in app/controllers/todos_controller.rb by flog

    Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

    You can read more about ABC metrics or the flog tool

    Complex method TodosController#create (190.5)
    Open

      def create
        @source_view = params['_source_view'] || 'todo'
        @default_context = current_user.contexts.where(:name => params['default_context_name']).first
        @default_project = current_user.projects.where(:name => params['default_project_name']).first if params['default_project_name'].present?
    
    
    Severity: Minor
    Found in app/controllers/todos_controller.rb by flog

    Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

    You can read more about ABC metrics or the flog tool

    Complex method ProjectsController#index (143.1)
    Open

      def index
        @source_view = params['_source_view'] || 'project_list'
        if params[:projects_and_actions]
          projects_and_actions
        else
    Severity: Minor
    Found in app/controllers/projects_controller.rb by flog

    Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

    You can read more about ABC metrics or the flog tool

    Class TodosController has 70 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class TodosController < ApplicationController
      skip_before_action :login_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
      prepend_before_action :login_or_feed_token_required, :only => [:index, :tag, :list_deferred, :show, :list_hidden, :done]
      append_before_action :find_and_activate_ready, :only => [:index, :list_deferred]
    
    
    Severity: Major
    Found in app/controllers/todos_controller.rb - About 1 day to fix

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-es.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-fr.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-fi.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-nb_NO.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-ru.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-nl.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-sv.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-tr.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-he.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-cs.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-de.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

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

      ( function( factory ) {
          "use strict";
      
          if ( typeof define === "function" && define.amd ) {
      
      
      Severity: Major
      Found in app/assets/javascripts-jquery-ui/datepicker-de.js and 10 other locations - About 1 day to fix
      app/assets/javascripts-jquery-ui/datepicker-cs.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-es.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fi.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-fr.js on lines 5..42
      app/assets/javascripts-jquery-ui/datepicker-he.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-nb_NO.js on lines 3..52
      app/assets/javascripts-jquery-ui/datepicker-nl.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-ru.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-sv.js on lines 3..40
      app/assets/javascripts-jquery-ui/datepicker-tr.js on lines 3..40

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

      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

      Complex method TodosController#create_multiple (139.3)
      Open

        def create_multiple
          p = Todos::TodoCreateParamsHelper.new(params, current_user)
          tag_list = p.tag_list
      
          @not_done_todos = []
      Severity: Minor
      Found in app/controllers/todos_controller.rb by flog

      Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

      You can read more about ABC metrics or the flog tool

      Complex method TodosController#index (130.3)
      Open

        def index
          @source_view = params['_source_view'] || 'todo'
      
          init_data_for_sidebar unless mobile?
      
      
      Severity: Minor
      Found in app/controllers/todos_controller.rb by flog

      Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

      You can read more about ABC metrics or the flog tool

      Severity
      Category
      Status
      Source
      Language