Semantic-Org/Semantic-UI

View on GitHub

Showing 558 of 804 total issues

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

      return gulp.src(release.source + component + '.*')
        .pipe(plumber())
        .pipe(flatten())
        .pipe(replace(release.paths.source, release.paths.output))
        .pipe(gulp.dest(outputDirectory))
Severity: Major
Found in tasks/admin/components/create.js and 1 other location - About 2 hrs to fix
tasks/admin/components/create.js on lines 153..157

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

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

  watchExamplesCallback = function(filePath) {
    console.clear();
    return gulp.src(filePath, {
        base: 'examples/'
      })
Severity: Major
Found in tasks/docs/serve.js and 1 other location - About 2 hrs to fix
tasks/docs/serve.js on lines 88..96

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

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

      return gulp.src(release.source + component + '!(*.min|*.map).js')
        .pipe(plumber())
        .pipe(flatten())
        .pipe(replace(regExp.match.componentExport, regExp.replace.componentExport))
        .pipe(replace(regExp.match.componentReference, regExp.replace.componentReference))
Severity: Major
Found in tasks/admin/components/create.js and 1 other location - About 2 hrs to fix
tasks/admin/components/create.js on lines 142..146

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

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

  watchSRCCallback = function(filePath) {
      console.clear();
      return gulp.src(filePath, {
          base: 'src/'
        })
Severity: Major
Found in tasks/docs/serve.js and 1 other location - About 2 hrs to fix
tasks/docs/serve.js on lines 112..120

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/checkbox.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/modal.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/rating.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/dimmer.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/behaviors/api.js and 15 other locations - About 2 hrs to fix
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/embed.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/search.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

    if(methodInvoked) {
      if(instance === undefined) {
        module.initialize();
      }
      module.invoke(query);
Severity: Major
Found in src/definitions/modules/sidebar.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/shape.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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 pushFiles() {
      console.info('Pushing files for ' + distribution);
      git.push('origin', 'master', { args: '', cwd: outputDirectory }, function(error) {
        console.info('Push completed successfully');
        getSHA();
Severity: Major
Found in tasks/admin/distributions/update.js and 1 other location - About 2 hrs to fix
tasks/admin/components/update.js on lines 137..143

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/popup.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/nag.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/dropdown.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/sticky.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/progress.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897
src/definitions/modules/tab.js on lines 857..868

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

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

      if(methodInvoked) {
        if(instance === undefined) {
          module.initialize();
        }
        module.invoke(query);
Severity: Major
Found in src/definitions/modules/tab.js and 15 other locations - About 2 hrs to fix
src/definitions/behaviors/api.js on lines 1006..1017
src/definitions/modules/accordion.js on lines 537..548
src/definitions/modules/checkbox.js on lines 754..765
src/definitions/modules/dimmer.js on lines 638..649
src/definitions/modules/dropdown.js on lines 3677..3688
src/definitions/modules/embed.js on lines 557..568
src/definitions/modules/modal.js on lines 932..943
src/definitions/modules/nag.js on lines 421..432
src/definitions/modules/popup.js on lines 1306..1317
src/definitions/modules/progress.js on lines 825..836
src/definitions/modules/rating.js on lines 430..441
src/definitions/modules/search.js on lines 1192..1203
src/definitions/modules/shape.js on lines 838..849
src/definitions/modules/sidebar.js on lines 930..941
src/definitions/modules/sticky.js on lines 886..897

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

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