valor-software/angular2-bootstrap

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

Summary

Maintainability
B
6 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/+alerts/alerts-section.list.ts and 4 other locations - About 1 hr to fix
demo/src/app/components/+popover/popover-section.list.ts on lines 180..196
demo/src/app/components/+progressbar/progressbar-section.list.ts on lines 60..76
demo/src/app/components/+timepicker/timepicker-section.list.ts on lines 151..167
demo/src/app/components/+tooltip/tooltip-section.list.ts on lines 157..173

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

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: 'Additional content',
        anchor: 'additional-content',
        description: `<p>Alerts can also contain additional HTML elements like headings and
          paragraphs.</p>`,
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Component level styling',
        anchor: 'local-styling',
        description: `<p>You can add additional types of alerts directly to containing component</p>`,
        component: require('!!raw-loader?lang=typescript!./demos/styling-local/styling-local.ts'),
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Dynamic html',
        anchor: 'dynamic-html',
        description: `<p>Sometimes you will need to show dynamically generated html in alerts, here
          is how you can make it. And don't forget to sanitize your html.</p>`,
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Basic',
        anchor: 'basic',
        description: `<p>Alerts are available for any length of text, as well as an optional dismiss
          button. For proper styling, use one of the four <strong>required</strong>
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Link color',
        anchor: 'link-color',
        description: `<p>Use the <code>.alert-link</code> utility class to quickly provide matching
          colored links within any alert.</p>`,
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Dismiss on timeout',
        anchor: 'dismiss-on-timeout',
        description: `<p>You can simply set timeout in milliseconds to <code>dismissOnTimeout</code>
          property to create self closable alerts.</p>`,
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Dismissing',
        anchor: 'dismissing',
        description: `<p>Alerts have <code>dismiss</code> option. Enabling it will show close button
          to the right of the alert.</p>`,
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Global styling',
        anchor: 'global-styling',
        description: `<p>You can add additional types of alerts globally.</p>`,
        component: require('!!raw-loader?lang=typescript!./demos/styling-global/styling-global.ts'),
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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

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

      {
        title: 'Configuring defaults',
        anchor: 'configuration',
        description: `<p>It is possible to override default alert config partially or completely.</p>`,
        component: require('!!raw-loader?lang=typescript!./demos/config/config.ts'),
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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/+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/+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

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

      {
        title: 'Dynamic content',
        anchor: 'dynamic-content',
        description: `<p>Alerts fully support bindings.</p>`,
        component: require('!!raw-loader?lang=typescript!./demos/dynamic-content/dynamic-content.ts'),
Severity: Major
Found in demo/src/app/components/+alerts/alerts-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 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/+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