divio/django-cms

View on GitHub

Showing 869 of 869 total issues

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

(function ($) {
    "use strict";

    $.fn.select2.locales['et'] = {
        formatNoMatches: function () { return "Tulemused puuduvad"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_et.js and 1 other location - About 1 day to fix
cms/static/cms/js/select2/select2_locale_nl.js on lines 4..17

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

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

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

    def apply(self, project_state, schema_editor, collect_sql=False):
        model = project_state.apps.get_model('cms', 'page')
        if not all(op.allow_migrate_model(schema_editor.connection.alias, model) for op in self.operations):
            return project_state

Severity: Major
Found in cms/migrations/0020_old_tree_cleanup.py and 1 other location - About 1 day to fix
cms/migrations/0019_set_pagenode.py on lines 63..84

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

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

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

    def apply(self, project_state, schema_editor, collect_sql=False):
        model = project_state.apps.get_model('cms', 'page')
        if not all(op.allow_migrate_model(schema_editor.connection.alias, model) for op in self.operations):
            return project_state

Severity: Major
Found in cms/migrations/0019_set_pagenode.py and 1 other location - About 1 day to fix
cms/migrations/0020_old_tree_cleanup.py on lines 58..79

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['mk'] = {
        formatNoMatches: function () { return "Нема пронајдено совпаѓања"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_mk.js and 6 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_es.js on lines 4..17
cms/static/cms/js/select2/select2_locale_id.js on lines 6..19
cms/static/cms/js/select2/select2_locale_pt-BR.js on lines 4..17
cms/static/cms/js/select2/select2_locale_pt-PT.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ro.js on lines 4..17
cms/static/cms/js/select2/select2_locale_vi.js on lines 6..19

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['vi'] = {
        formatNoMatches: function () { return "Không tìm thấy kết quả"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_vi.js and 6 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_es.js on lines 4..17
cms/static/cms/js/select2/select2_locale_id.js on lines 6..19
cms/static/cms/js/select2/select2_locale_mk.js on lines 6..19
cms/static/cms/js/select2/select2_locale_pt-BR.js on lines 4..17
cms/static/cms/js/select2/select2_locale_pt-PT.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ro.js on lines 4..17

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['pt-BR'] = {
        formatNoMatches: function () { return "Nenhum resultado encontrado"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_pt-BR.js and 6 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_es.js on lines 4..17
cms/static/cms/js/select2/select2_locale_id.js on lines 6..19
cms/static/cms/js/select2/select2_locale_mk.js on lines 6..19
cms/static/cms/js/select2/select2_locale_pt-PT.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ro.js on lines 4..17
cms/static/cms/js/select2/select2_locale_vi.js on lines 6..19

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['ro'] = {
        formatNoMatches: function () { return "Nu a fost găsit nimic"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_ro.js and 6 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_es.js on lines 4..17
cms/static/cms/js/select2/select2_locale_id.js on lines 6..19
cms/static/cms/js/select2/select2_locale_mk.js on lines 6..19
cms/static/cms/js/select2/select2_locale_pt-BR.js on lines 4..17
cms/static/cms/js/select2/select2_locale_pt-PT.js on lines 4..17
cms/static/cms/js/select2/select2_locale_vi.js on lines 6..19

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['pt-PT'] = {
        formatNoMatches: function () { return "Nenhum resultado encontrado"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_pt-PT.js and 6 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_es.js on lines 4..17
cms/static/cms/js/select2/select2_locale_id.js on lines 6..19
cms/static/cms/js/select2/select2_locale_mk.js on lines 6..19
cms/static/cms/js/select2/select2_locale_pt-BR.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ro.js on lines 4..17
cms/static/cms/js/select2/select2_locale_vi.js on lines 6..19

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['es'] = {
        formatNoMatches: function () { return "No se encontraron resultados"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_es.js and 6 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_id.js on lines 6..19
cms/static/cms/js/select2/select2_locale_mk.js on lines 6..19
cms/static/cms/js/select2/select2_locale_pt-BR.js on lines 4..17
cms/static/cms/js/select2/select2_locale_pt-PT.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ro.js on lines 4..17
cms/static/cms/js/select2/select2_locale_vi.js on lines 6..19

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['id'] = {
        formatNoMatches: function () { return "Tidak ada data yang sesuai"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_id.js and 6 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_es.js on lines 4..17
cms/static/cms/js/select2/select2_locale_mk.js on lines 6..19
cms/static/cms/js/select2/select2_locale_pt-BR.js on lines 4..17
cms/static/cms/js/select2/select2_locale_pt-PT.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ro.js on lines 4..17
cms/static/cms/js/select2/select2_locale_vi.js on lines 6..19

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

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

File jstree.grid.min.js has 626 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * https://github.com/deitch/jstree-grid
 *
 * This plugin handles adding a grid to a tree to display additional data
 *
Severity: Major
Found in cms/static/cms/js/libs/jstree/jstree.grid.min.js - About 1 day to fix

    File cms_toolbars.py has 626 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    from django.conf import settings
    from django.contrib import admin
    from django.contrib.auth import get_permission_codename, get_user_model
    from django.contrib.auth.models import AnonymousUser
    from django.contrib.sites.models import Site
    Severity: Major
    Found in cms/cms_toolbars.py - About 1 day to fix

      Function _scan_placeholders has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
      Open

      def _scan_placeholders(nodelist, node_class=None, current_block=None, ignore_blocks=None):
          from cms.templatetags.cms_tags import Placeholder
      
          if not node_class:
              node_class = Placeholder
      Severity: Minor
      Found in cms/utils/placeholder.py - 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

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

          @csrf_protect_m
          def add_view(self, request, form_url='', extra_context=None):
              """
              Check if the page already has an extension object. If so, redirect to edit view instead.
              """
      Severity: Major
      Found in cms/extensions/admin.py and 1 other location - About 1 day to fix
      cms/extensions/admin.py on lines 42..60

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          @csrf_protect_m
          def add_view(self, request, form_url='', extra_context=None):
              """
              Check if the page already has an extension object. If so, redirect to edit view instead.
              """
      Severity: Major
      Found in cms/extensions/admin.py and 1 other location - About 1 day to fix
      cms/extensions/admin.py on lines 91..109

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

      (function ($) {
          "use strict";
      
          $.fn.select2.locales['sv'] = {
              formatNoMatches: function () { return "Inga träffar"; },
      Severity: Major
      Found in cms/static/cms/js/select2/select2_locale_sv.js and 1 other location - About 1 day to fix
      cms/static/cms/js/select2/select2_locale_no.js on lines 6..19

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

      (function ($) {
          "use strict";
      
          $.fn.select2.locales['no'] = {
              formatNoMatches: function () { return "Ingen treff"; },
      Severity: Major
      Found in cms/static/cms/js/select2/select2_locale_no.js and 1 other location - About 1 day to fix
      cms/static/cms/js/select2/select2_locale_sv.js on lines 6..19

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function add_page_menu has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
      Open

          def add_page_menu(self):
              if self.page:
                  edit_mode = self.toolbar.edit_mode_active
                  refresh = self.toolbar.REFRESH_PAGE
                  can_change = user_can_change_page(
      Severity: Minor
      Found in cms/cms_toolbars.py - 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

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

      (function ($) {
          "use strict";
      
          $.fn.select2.locales['ja'] = {
              formatNoMatches: function () { return "該当なし"; },
      Severity: Major
      Found in cms/static/cms/js/select2/select2_locale_ja.js and 10 other locations - About 1 day to fix
      cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
      cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
      cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
      cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
      cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

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

      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 ($) {
          "use strict";
      
          $.fn.select2.locales['ko'] = {
              formatNoMatches: function () { return "결과 없음"; },
      Severity: Major
      Found in cms/static/cms/js/select2/select2_locale_ko.js and 10 other locations - About 1 day to fix
      cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
      cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
      cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
      cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
      cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
      cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
      cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

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

      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