TracksApp/tracks

View on GitHub

Showing 1,608 of 1,614 total issues

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#create (192.8)
    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 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 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-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-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-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-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-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-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-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-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-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-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

      Complex method TodosController#toggle_check (128.0)
      Open

        def toggle_check
          @todo = current_user.todos.find(params['id'])
      
          @source_view = params['_source_view'] || 'todo'
      
      
      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 StatsController#show_selected_actions_from_chart (121.2)
      Open

        def show_selected_actions_from_chart
          @page_title = t('stats.action_selection_title')
          @count = 99
      
          @source_view = 'stats'
      Severity: Minor
      Found in app/controllers/stats_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