bitovi/canjs

View on GitHub

Showing 380 of 460 total issues

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

  updateCompleteTo(value) {
    this.forEach(function(todo) {
      todo.complete = value;
      todo.save();
    });
Severity: Minor
Found in docs/can-guides/experiment/todomvc/9-toggle/js.js and 2 other locations - About 35 mins to fix
docs/can-guides/commitment/recipes/todomvc-with-steal/15-setter-toggle/todo.js on lines 51..56
docs/can-guides/commitment/recipes/todomvc-with-steal/16-clear-all-completed/todo.js on lines 51..56

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

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

        this.listenTo(window, "resize", () => {
            this.width = width(this) - this.firstElementChild.offsetWidth;
        });
Severity: Minor
Found in demos/technology-overview/percent-slider.js and 1 other location - About 35 mins to fix
demos/technology-overview/component-slider.js on lines 48..50

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

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

class RichTextEditor extends StacheElement {
  static view = `
    <div class="controls">
            <button on:click="this.exec('bold')" class="bold">B</button>
            <button on:click="this.exec('italic')" class="italic">I</button>
Severity: Minor
Found in docs/can-guides/commitment/recipes/text-editor/3-italic.js and 1 other location - About 35 mins to fix
docs/can-guides/commitment/recipes/text-editor/2-bold.js on lines 3..24

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

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

class RichTextEditor extends StacheElement {
  static view = `
    <div class="controls">
      <button on:click="this.exec('bold')" class="bold">B</button>
    </div>
Severity: Minor
Found in docs/can-guides/commitment/recipes/text-editor/2-bold.js and 1 other location - About 35 mins to fix
docs/can-guides/commitment/recipes/text-editor/3-italic.js on lines 3..25

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/10-deposit-info/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/6-reading-card/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/8-choosing-transaction/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/5-transactions-models/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/9-picking-account/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/1-pages-template/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/13-printing/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

connection.getList({}).then(data =>
    console.log(`Loaded ${data.length} todos.`)
);
docs/can-guides/topics/data/customizing-connections/implement.js on lines 23..25
docs/can-guides/topics/data/customizing-connections/interface.js on lines 42..44
docs/can-guides/topics/data/customizing-connections/interface.js on lines 45..47
docs/can-guides/topics/data/customizing-connections/practical-implementor.js on lines 105..107

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/4-deposit-test/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/2-card-tests/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/3-card-model/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 237..240
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

fetchConn.getListData({}).then(data =>
    console.log(`Used fetch to load ${data.length} todos.`)
);
docs/can-guides/topics/data/customizing-connections/implement.js on lines 23..25
docs/can-guides/topics/data/customizing-connections/interface.js on lines 42..44
docs/can-guides/topics/data/customizing-connections/practical-extender.js on lines 49..51
docs/can-guides/topics/data/customizing-connections/practical-implementor.js on lines 105..107

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

fetchConn.getListData({}).then(data =>
    console.log(`Used fetch to load ${data.length} todos.`)
);
docs/can-guides/topics/data/customizing-connections/interface.js on lines 42..44
docs/can-guides/topics/data/customizing-connections/interface.js on lines 45..47
docs/can-guides/topics/data/customizing-connections/practical-extender.js on lines 49..51
docs/can-guides/topics/data/customizing-connections/practical-implementor.js on lines 105..107

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

fetchConn.getListData({}).then(data =>
    console.log(`Used fetch to load ${data.length} todos.`)
);
docs/can-guides/topics/data/customizing-connections/implement.js on lines 23..25
docs/can-guides/topics/data/customizing-connections/interface.js on lines 42..44
docs/can-guides/topics/data/customizing-connections/interface.js on lines 45..47
docs/can-guides/topics/data/customizing-connections/practical-extender.js on lines 49..51

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

xhrConn.getListData({}).then(data =>
    console.log(`Used XHR to load ${data.length} todos.`)
);
docs/can-guides/topics/data/customizing-connections/implement.js on lines 23..25
docs/can-guides/topics/data/customizing-connections/interface.js on lines 45..47
docs/can-guides/topics/data/customizing-connections/practical-extender.js on lines 49..51
docs/can-guides/topics/data/customizing-connections/practical-implementor.js on lines 105..107

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

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

document.body.insertBefore(
    can.stache.from("app-template")({}),
    document.body.firstChild
);
Severity: Major
Found in docs/can-guides/experiment/atm/7-reading-pin/js.js and 10 other locations - About 30 mins to fix
docs/can-guides/experiment/atm/1-pages-template/js.js on lines 15..18
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 282..285
docs/can-guides/experiment/atm/13-printing/js.js on lines 298..301
docs/can-guides/experiment/atm/2-card-tests/js.js on lines 15..18
docs/can-guides/experiment/atm/3-card-model/js.js on lines 54..57
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 54..57
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 199..202
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 214..217
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 264..267
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 275..278

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

Severity
Category
Status
Source
Language