redmine/redmine

View on GitHub

Showing 1,179 of 1,179 total issues

Class Project has 86 methods (exceeds 20 allowed). Consider refactoring.
Open

class Project < ApplicationRecord
  include Redmine::SafeAttributes
  include Redmine::NestedSet::ProjectNestedSet

  # Project statuses
Severity: Major
Found in app/models/project.rb - About 1 day to fix

    File issues_helper.rb has 663 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module IssuesHelper
      include ApplicationHelper
      include Redmine::Export::PDF::IssuesPdfHelper
      include IssueStatusesHelper
    
    
    Severity: Major
    Found in app/helpers/issues_helper.rb - About 1 day to fix

      Method revisions has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
      Open

              def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={}, &block)
                path_with_project_utf8   = path_with_proj(path)
                path_with_project_locale = scm_iconv(@path_encoding, 'UTF-8', path_with_project_utf8)
                logger.debug "<cvs> revisions path:" +
                    "'#{path}',identifier_from #{identifier_from}, identifier_to #{identifier_to}"
      Severity: Minor
      Found in lib/redmine/scm/adapters/cvs_adapter.rb - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method sql_for_field has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
      Open

        def sql_for_field(field, operator, value, db_table, db_field, is_custom_filter=false)
          sql = ''
          case operator
          when "="
            if value.any?
      Severity: Minor
      Found in app/models/query.rb - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method revisions has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
      Open

              def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={})
                path ||= ''
                identifier_from = (identifier_from and identifier_from.to_i > 0) ? identifier_from.to_i : 'last:1'
                identifier_to = (identifier_to and identifier_to.to_i > 0) ? identifier_to.to_i : 1
                revisions = Revisions.new
      Severity: Minor
      Found in lib/redmine/scm/adapters/bazaar_adapter.rb - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      File issues_controller.rb has 621 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      class IssuesController < ApplicationController
        default_search_scope :issues
      
        before_action :find_issue, :only => [:show, :edit, :update, :issue_tab]
        before_action :find_issues, :only => [:bulk_edit, :bulk_update, :destroy]
      Severity: Major
      Found in app/controllers/issues_controller.rb - About 1 day to fix

        File application_controller.rb has 600 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require 'uri'
        require 'cgi'
        
        class Unauthorized < StandardError; end
        
        
        Severity: Major
        Found in app/controllers/application_controller.rb - About 1 day to fix

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

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-fa.js and 3 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-id.js on lines 4..41
          app/assets/javascripts/i18n/datepicker-sl.js on lines 4..41
          app/assets/javascripts/i18n/datepicker-uk.js on lines 4..41

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

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

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-uk.js and 3 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-fa.js on lines 4..76
          app/assets/javascripts/i18n/datepicker-id.js on lines 4..41
          app/assets/javascripts/i18n/datepicker-sl.js on lines 4..41

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

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

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-sl.js and 3 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-fa.js on lines 4..76
          app/assets/javascripts/i18n/datepicker-id.js on lines 4..41
          app/assets/javascripts/i18n/datepicker-uk.js on lines 4..41

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

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

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-id.js and 3 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-fa.js on lines 4..76
          app/assets/javascripts/i18n/datepicker-sl.js on lines 4..41
          app/assets/javascripts/i18n/datepicker-uk.js on lines 4..41

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

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

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-fi.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-it.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-mk.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-az.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-sk.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-es.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-sq.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-cs.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-et.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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 31 locations. Consider refactoring.
          Open

          ( function( factory ) {
              "use strict";
          
              if ( typeof define === "function" && define.amd ) {
          
          
          Severity: Major
          Found in app/assets/javascripts/i18n/datepicker-et.js and 30 other locations - About 1 day to fix
          app/assets/javascripts/i18n/datepicker-az.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-bs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ca.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-cs.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-da.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-de.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-el.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-es.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fi.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-fr.js on lines 5..42
          app/assets/javascripts/i18n/datepicker-gl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-he.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-hr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-it.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ja.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ko.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-lt.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-lv.js on lines 3..48
          app/assets/javascripts/i18n/datepicker-mk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-nl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-no.js on lines 4..53
          app/assets/javascripts/i18n/datepicker-pl.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-ru.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sk.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sq.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-sv.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-th.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-tr.js on lines 3..40
          app/assets/javascripts/i18n/datepicker-vi.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

          Severity
          Category
          Status
          Source
          Language