Semantic-Org/Semantic-UI

View on GitHub

Showing 558 of 804 total issues

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

        internal: function(name, value) {
          if( $.isPlainObject(name) ) {
            $.extend(true, module, name);
          }
          else if(value !== undefined) {
Severity: Major
Found in src/definitions/modules/dimmer.js and 24 other locations - About 1 hr to fix
src/definitions/behaviors/api.js on lines 860..870
src/definitions/behaviors/form.js on lines 1037..1047
src/definitions/behaviors/form.js on lines 1048..1058
src/definitions/behaviors/visibility.js on lines 1031..1041
src/definitions/behaviors/visibility.js on lines 1042..1052
src/definitions/globals/site.js on lines 255..265
src/definitions/globals/site.js on lines 266..276
src/definitions/modules/checkbox.js on lines 608..618
src/definitions/modules/dropdown.js on lines 3531..3541
src/definitions/modules/embed.js on lines 408..418
src/definitions/modules/modal.js on lines 787..797
src/definitions/modules/nag.js on lines 275..285
src/definitions/modules/popup.js on lines 1150..1160
src/definitions/modules/popup.js on lines 1161..1171
src/definitions/modules/progress.js on lines 679..689
src/definitions/modules/rating.js on lines 283..293
src/definitions/modules/search.js on lines 1034..1044
src/definitions/modules/search.js on lines 1045..1055
src/definitions/modules/shape.js on lines 690..700
src/definitions/modules/sidebar.js on lines 783..793
src/definitions/modules/sticky.js on lines 730..740
src/definitions/modules/sticky.js on lines 741..751
src/definitions/modules/tab.js on lines 712..722
src/definitions/modules/transition.js on lines 853..863

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

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

        setting: function(name, value) {
          if( $.isPlainObject(name) ) {
            $.extend(true, settings, name);
          }
          else if(value !== undefined) {
Severity: Major
Found in src/definitions/modules/search.js and 24 other locations - About 1 hr to fix
src/definitions/behaviors/api.js on lines 860..870
src/definitions/behaviors/form.js on lines 1037..1047
src/definitions/behaviors/form.js on lines 1048..1058
src/definitions/behaviors/visibility.js on lines 1031..1041
src/definitions/behaviors/visibility.js on lines 1042..1052
src/definitions/globals/site.js on lines 255..265
src/definitions/globals/site.js on lines 266..276
src/definitions/modules/checkbox.js on lines 608..618
src/definitions/modules/dimmer.js on lines 487..497
src/definitions/modules/dropdown.js on lines 3531..3541
src/definitions/modules/embed.js on lines 408..418
src/definitions/modules/modal.js on lines 787..797
src/definitions/modules/nag.js on lines 275..285
src/definitions/modules/popup.js on lines 1150..1160
src/definitions/modules/popup.js on lines 1161..1171
src/definitions/modules/progress.js on lines 679..689
src/definitions/modules/rating.js on lines 283..293
src/definitions/modules/search.js on lines 1045..1055
src/definitions/modules/shape.js on lines 690..700
src/definitions/modules/sidebar.js on lines 783..793
src/definitions/modules/sticky.js on lines 730..740
src/definitions/modules/sticky.js on lines 741..751
src/definitions/modules/tab.js on lines 712..722
src/definitions/modules/transition.js on lines 853..863

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

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

        setting: function(name, value) {
          if( $.isPlainObject(name) ) {
            $.extend(true, settings, name);
          }
          else if(value !== undefined) {
Severity: Major
Found in src/definitions/modules/popup.js and 24 other locations - About 1 hr to fix
src/definitions/behaviors/api.js on lines 860..870
src/definitions/behaviors/form.js on lines 1037..1047
src/definitions/behaviors/form.js on lines 1048..1058
src/definitions/behaviors/visibility.js on lines 1031..1041
src/definitions/behaviors/visibility.js on lines 1042..1052
src/definitions/globals/site.js on lines 255..265
src/definitions/globals/site.js on lines 266..276
src/definitions/modules/checkbox.js on lines 608..618
src/definitions/modules/dimmer.js on lines 487..497
src/definitions/modules/dropdown.js on lines 3531..3541
src/definitions/modules/embed.js on lines 408..418
src/definitions/modules/modal.js on lines 787..797
src/definitions/modules/nag.js on lines 275..285
src/definitions/modules/popup.js on lines 1161..1171
src/definitions/modules/progress.js on lines 679..689
src/definitions/modules/rating.js on lines 283..293
src/definitions/modules/search.js on lines 1034..1044
src/definitions/modules/search.js on lines 1045..1055
src/definitions/modules/shape.js on lines 690..700
src/definitions/modules/sidebar.js on lines 783..793
src/definitions/modules/sticky.js on lines 730..740
src/definitions/modules/sticky.js on lines 741..751
src/definitions/modules/tab.js on lines 712..722
src/definitions/modules/transition.js on lines 853..863

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

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

        internal: function(name, value) {
          if( $.isPlainObject(name) ) {
            $.extend(true, module, name);
          }
          else if(value !== undefined) {
Severity: Major
Found in src/definitions/modules/rating.js and 24 other locations - About 1 hr to fix
src/definitions/behaviors/api.js on lines 860..870
src/definitions/behaviors/form.js on lines 1037..1047
src/definitions/behaviors/form.js on lines 1048..1058
src/definitions/behaviors/visibility.js on lines 1031..1041
src/definitions/behaviors/visibility.js on lines 1042..1052
src/definitions/globals/site.js on lines 255..265
src/definitions/globals/site.js on lines 266..276
src/definitions/modules/checkbox.js on lines 608..618
src/definitions/modules/dimmer.js on lines 487..497
src/definitions/modules/dropdown.js on lines 3531..3541
src/definitions/modules/embed.js on lines 408..418
src/definitions/modules/modal.js on lines 787..797
src/definitions/modules/nag.js on lines 275..285
src/definitions/modules/popup.js on lines 1150..1160
src/definitions/modules/popup.js on lines 1161..1171
src/definitions/modules/progress.js on lines 679..689
src/definitions/modules/search.js on lines 1034..1044
src/definitions/modules/search.js on lines 1045..1055
src/definitions/modules/shape.js on lines 690..700
src/definitions/modules/sidebar.js on lines 783..793
src/definitions/modules/sticky.js on lines 730..740
src/definitions/modules/sticky.js on lines 741..751
src/definitions/modules/tab.js on lines 712..722
src/definitions/modules/transition.js on lines 853..863

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

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

    setting: function(name, value) {
      if( $.isPlainObject(name) ) {
        $.extend(true, settings, name);
      }
      else if(value !== undefined) {
Severity: Major
Found in src/definitions/globals/site.js and 24 other locations - About 1 hr to fix
src/definitions/behaviors/api.js on lines 860..870
src/definitions/behaviors/form.js on lines 1037..1047
src/definitions/behaviors/form.js on lines 1048..1058
src/definitions/behaviors/visibility.js on lines 1031..1041
src/definitions/behaviors/visibility.js on lines 1042..1052
src/definitions/globals/site.js on lines 266..276
src/definitions/modules/checkbox.js on lines 608..618
src/definitions/modules/dimmer.js on lines 487..497
src/definitions/modules/dropdown.js on lines 3531..3541
src/definitions/modules/embed.js on lines 408..418
src/definitions/modules/modal.js on lines 787..797
src/definitions/modules/nag.js on lines 275..285
src/definitions/modules/popup.js on lines 1150..1160
src/definitions/modules/popup.js on lines 1161..1171
src/definitions/modules/progress.js on lines 679..689
src/definitions/modules/rating.js on lines 283..293
src/definitions/modules/search.js on lines 1034..1044
src/definitions/modules/search.js on lines 1045..1055
src/definitions/modules/shape.js on lines 690..700
src/definitions/modules/sidebar.js on lines 783..793
src/definitions/modules/sticky.js on lines 730..740
src/definitions/modules/sticky.js on lines 741..751
src/definitions/modules/tab.js on lines 712..722
src/definitions/modules/transition.js on lines 853..863

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

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

        internal: function(name, value) {
          if( $.isPlainObject(name) ) {
            $.extend(true, module, name);
          }
          else if(value !== undefined) {
Severity: Major
Found in src/definitions/modules/popup.js and 24 other locations - About 1 hr to fix
src/definitions/behaviors/api.js on lines 860..870
src/definitions/behaviors/form.js on lines 1037..1047
src/definitions/behaviors/form.js on lines 1048..1058
src/definitions/behaviors/visibility.js on lines 1031..1041
src/definitions/behaviors/visibility.js on lines 1042..1052
src/definitions/globals/site.js on lines 255..265
src/definitions/globals/site.js on lines 266..276
src/definitions/modules/checkbox.js on lines 608..618
src/definitions/modules/dimmer.js on lines 487..497
src/definitions/modules/dropdown.js on lines 3531..3541
src/definitions/modules/embed.js on lines 408..418
src/definitions/modules/modal.js on lines 787..797
src/definitions/modules/nag.js on lines 275..285
src/definitions/modules/popup.js on lines 1150..1160
src/definitions/modules/progress.js on lines 679..689
src/definitions/modules/rating.js on lines 283..293
src/definitions/modules/search.js on lines 1034..1044
src/definitions/modules/search.js on lines 1045..1055
src/definitions/modules/shape.js on lines 690..700
src/definitions/modules/sidebar.js on lines 783..793
src/definitions/modules/sticky.js on lines 730..740
src/definitions/modules/sticky.js on lines 741..751
src/definitions/modules/tab.js on lines 712..722
src/definitions/modules/transition.js on lines 853..863

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

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

        internal: function(name, value) {
          if( $.isPlainObject(name) ) {
            $.extend(true, module, name);
          }
          else if(value !== undefined) {
Severity: Major
Found in src/definitions/modules/sticky.js and 24 other locations - About 1 hr to fix
src/definitions/behaviors/api.js on lines 860..870
src/definitions/behaviors/form.js on lines 1037..1047
src/definitions/behaviors/form.js on lines 1048..1058
src/definitions/behaviors/visibility.js on lines 1031..1041
src/definitions/behaviors/visibility.js on lines 1042..1052
src/definitions/globals/site.js on lines 255..265
src/definitions/globals/site.js on lines 266..276
src/definitions/modules/checkbox.js on lines 608..618
src/definitions/modules/dimmer.js on lines 487..497
src/definitions/modules/dropdown.js on lines 3531..3541
src/definitions/modules/embed.js on lines 408..418
src/definitions/modules/modal.js on lines 787..797
src/definitions/modules/nag.js on lines 275..285
src/definitions/modules/popup.js on lines 1150..1160
src/definitions/modules/popup.js on lines 1161..1171
src/definitions/modules/progress.js on lines 679..689
src/definitions/modules/rating.js on lines 283..293
src/definitions/modules/search.js on lines 1034..1044
src/definitions/modules/search.js on lines 1045..1055
src/definitions/modules/shape.js on lines 690..700
src/definitions/modules/sidebar.js on lines 783..793
src/definitions/modules/sticky.js on lines 730..740
src/definitions/modules/tab.js on lines 712..722
src/definitions/modules/transition.js on lines 853..863

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

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

        if(response[fields.action]) {
          html += ''
          + '<a href="' + response[fields.action][fields.actionURL] + '" class="action">'
          +   response[fields.action][fields.actionText]
          + '</a>';
Severity: Major
Found in src/definitions/modules/search.js and 1 other location - About 1 hr to fix
src/definitions/modules/search.js on lines 1445..1450

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

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

      compressedStream
        .pipe(plumber())
        .pipe(replace(assets.source, assets.compressed))
        .pipe(minifyCSS(settings.minify))
        .pipe(rename(settings.rename.minCSS))
Severity: Major
Found in tasks/watch.js and 2 other locations - About 1 hr to fix
tasks/docs/serve.js on lines 222..227
tasks/rtl/watch.js on lines 167..172

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

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

      compressedStream
        .pipe(plumber())
        .pipe(replace(assets.source, assets.compressed))
        .pipe(minifyCSS(settings.minify))
        .pipe(rename(settings.rename.minCSS))
Severity: Major
Found in tasks/docs/serve.js and 2 other locations - About 1 hr to fix
tasks/rtl/watch.js on lines 167..172
tasks/watch.js on lines 183..188

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

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

    function createRepo() {
      console.info('Creating GitHub repo ' + repoURL);
      github.repos.createFromOrg({
        org      : release.org,
        name     : repoName,
Severity: Major
Found in tasks/admin/distributions/init.js and 1 other location - About 1 hr to fix
tasks/admin/components/init.js on lines 116..125

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

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

        compressedStream
          .pipe(plumber())
          .pipe(replace(assets.source, assets.compressed))
          .pipe(minifyCSS(settings.minify))
          .pipe(rename(settings.rename.minCSS))
Severity: Major
Found in tasks/rtl/watch.js and 2 other locations - About 1 hr to fix
tasks/docs/serve.js on lines 222..227
tasks/watch.js on lines 183..188

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

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

        if(response[fields.action]) {
          html += ''
          + '<a href="' + response[fields.action][fields.actionURL] + '" class="action">'
          +   response[fields.action][fields.actionText]
          + '</a>';
Severity: Major
Found in src/definitions/modules/search.js and 1 other location - About 1 hr to fix
src/definitions/modules/search.js on lines 1492..1497

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

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

    function createRepo() {
      console.info('Creating GitHub repo ' + repoURL);
      github.repos.createFromOrg({
        org      : release.org,
        name     : repoName,
Severity: Major
Found in tasks/admin/components/init.js and 1 other location - About 1 hr to fix
tasks/admin/distributions/init.js on lines 113..122

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

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

    contains: function(value, text) {
      // escape regex characters
      text = text.replace($.fn.form.settings.regExp.escape, "\\$&");
      return (value.search( new RegExp(text, 'i') ) !== -1);
    },
Severity: Major
Found in src/definitions/behaviors/form.js and 1 other location - About 1 hr to fix
src/definitions/behaviors/form.js on lines 1472..1476

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

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

          touchClose: function() {
            module.verbose('Binding popup touchclose event to document');
            $document
              .on('touchstart' + elementNamespace, function(event) {
                module.verbose('Touched away from popup');
Severity: Major
Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
src/definitions/modules/popup.js on lines 1037..1045

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

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

    doesntContain: function(value, text) {
      // escape regex characters
      text = text.replace($.fn.form.settings.regExp.escape, "\\$&");
      return (value.search( new RegExp(text, 'i') ) === -1);
    },
Severity: Major
Found in src/definitions/behaviors/form.js and 1 other location - About 1 hr to fix
src/definitions/behaviors/form.js on lines 1458..1462

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

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

          clickaway: function() {
            module.verbose('Binding popup close event to document');
            $document
              .on('click' + elementNamespace, function(event) {
                module.verbose('Clicked away from popup');
Severity: Major
Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
src/definitions/modules/popup.js on lines 1028..1036

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

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

              case 'top right':
                positioning = {
                  bottom :  parent.height - target.top + distanceAway,
                  right  :  parent.width - target.left - target.width - offset,
                  top    : 'auto',
Severity: Major
Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
src/definitions/modules/popup.js on lines 875..882

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

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

    not: function(value, notValue) {
      value = (typeof value == 'string')
        ? value.toLowerCase()
        : value
      ;
Severity: Major
Found in src/definitions/behaviors/form.js and 1 other location - About 1 hr to fix
src/definitions/behaviors/form.js on lines 1422..1432

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

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