valor-software/ng2-bootstrap

View on GitHub
demo/src/app/components/+carousel/carousel-section.list.ts

Summary

Maintainability
A
2 hrs
Test Coverage

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

  {
    name: 'API Reference',
    anchor: 'api-reference',
    outlet: ApiSectionsComponent,
    content: [
Severity: Major
Found in demo/src/app/components/+carousel/carousel-section.list.ts and 4 other locations - About 1 hr to fix
demo/src/app/components/+accordion/accordion-section.list.ts on lines 120..141
demo/src/app/components/+buttons/buttons-section.list.ts on lines 97..118
demo/src/app/components/+datepicker/datepicker-section.list.ts on lines 251..272
demo/src/app/components/+pagination/pagination-section.list.ts on lines 137..158

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

      {
        title: 'Pause on hover',
        anchor: 'pause-on-hover',
        description: `<p>Click button to pause on hover.</p>`,
        component: require('!!raw-loader?lang=typescript!./demos/no-pause/no-pause.ts'),
Severity: Major
Found in demo/src/app/components/+carousel/carousel-section.list.ts and 25 other locations - About 30 mins to fix
demo/src/app/components/+accordion/accordion-section.list.ts on lines 37..45
demo/src/app/components/+accordion/accordion-section.list.ts on lines 46..53
demo/src/app/components/+alerts/alerts-section.list.ts on lines 36..46
demo/src/app/components/+alerts/alerts-section.list.ts on lines 47..55
demo/src/app/components/+alerts/alerts-section.list.ts on lines 56..64
demo/src/app/components/+alerts/alerts-section.list.ts on lines 65..73
demo/src/app/components/+alerts/alerts-section.list.ts on lines 74..82
demo/src/app/components/+alerts/alerts-section.list.ts on lines 83..90
demo/src/app/components/+alerts/alerts-section.list.ts on lines 91..99
demo/src/app/components/+alerts/alerts-section.list.ts on lines 100..107
demo/src/app/components/+alerts/alerts-section.list.ts on lines 108..115
demo/src/app/components/+alerts/alerts-section.list.ts on lines 116..123
demo/src/app/components/+buttons/buttons-section.list.ts on lines 38..45
demo/src/app/components/+buttons/buttons-section.list.ts on lines 53..60
demo/src/app/components/+buttons/buttons-section.list.ts on lines 61..70
demo/src/app/components/+buttons/buttons-section.list.ts on lines 78..87
demo/src/app/components/+carousel/carousel-section.list.ts on lines 41..50
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 68..78
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 79..89
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 90..99
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 137..147
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 148..158
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 159..169
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 177..187
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 188..198

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

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

      {
        title: 'Optional captions',
        anchor: 'captions',
        description: `<p>Add captions to your slides easily with the <code>.carousel-caption</code>
          element within any <code>&lt;slide></code>. Place just about any optional HTML within there
Severity: Major
Found in demo/src/app/components/+carousel/carousel-section.list.ts and 25 other locations - About 30 mins to fix
demo/src/app/components/+accordion/accordion-section.list.ts on lines 37..45
demo/src/app/components/+accordion/accordion-section.list.ts on lines 46..53
demo/src/app/components/+alerts/alerts-section.list.ts on lines 36..46
demo/src/app/components/+alerts/alerts-section.list.ts on lines 47..55
demo/src/app/components/+alerts/alerts-section.list.ts on lines 56..64
demo/src/app/components/+alerts/alerts-section.list.ts on lines 65..73
demo/src/app/components/+alerts/alerts-section.list.ts on lines 74..82
demo/src/app/components/+alerts/alerts-section.list.ts on lines 83..90
demo/src/app/components/+alerts/alerts-section.list.ts on lines 91..99
demo/src/app/components/+alerts/alerts-section.list.ts on lines 100..107
demo/src/app/components/+alerts/alerts-section.list.ts on lines 108..115
demo/src/app/components/+alerts/alerts-section.list.ts on lines 116..123
demo/src/app/components/+buttons/buttons-section.list.ts on lines 38..45
demo/src/app/components/+buttons/buttons-section.list.ts on lines 53..60
demo/src/app/components/+buttons/buttons-section.list.ts on lines 61..70
demo/src/app/components/+buttons/buttons-section.list.ts on lines 78..87
demo/src/app/components/+carousel/carousel-section.list.ts on lines 65..72
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 68..78
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 79..89
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 90..99
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 137..147
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 148..158
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 159..169
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 177..187
demo/src/app/components/+typeahead/typeahead-section.list.ts on lines 188..198

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

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

There are no issues that match your filters.

Category
Status