bitovi/canjs

View on GitHub

Showing 380 of 460 total issues

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

class PlaylistEditor extends StacheElement {
    static view = `
        {{# if(this.googleApiLoadedPromise.isPending) }}
            <div>Loading Google API…</div>
        {{ else }}
Severity: Major
Found in docs/can-guides/commitment/recipes/playlist-editor/5-drop.js and 2 other locations - About 3 days to fix
docs/can-guides/commitment/recipes/playlist-editor/6-order.js on lines 61..224
docs/can-guides/commitment/recipes/playlist-editor/7-revert.js on lines 70..233

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

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

class PlaylistEditor extends StacheElement {
    static view = `
        {{# if(this.googleApiLoadedPromise.isPending) }}
            <div>Loading Google API…</div>
        {{ else }}
docs/can-guides/commitment/recipes/playlist-editor/5-drop.js on lines 10..172
docs/can-guides/commitment/recipes/playlist-editor/6-order.js on lines 61..224

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

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

class PlaylistEditor extends StacheElement {
    static view = `
        {{# if(this.googleApiLoadedPromise.isPending) }}
            <div>Loading Google API…</div>
        {{ else }}
Severity: Major
Found in docs/can-guides/commitment/recipes/playlist-editor/6-order.js and 2 other locations - About 3 days to fix
docs/can-guides/commitment/recipes/playlist-editor/5-drop.js on lines 10..172
docs/can-guides/commitment/recipes/playlist-editor/7-revert.js on lines 70..233

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

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

var Transaction = can.DefineMap.extend({
    account: Account,
    card: Card,
    executing: {
        type: "boolean",
Severity: Major
Found in docs/can-guides/experiment/atm/13-printing/js.js and 6 other locations - About 2 days to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 79..141
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 79..141
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 79..141
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 79..141
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 79..141
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 79..141

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

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

var Transaction = can.DefineMap.extend({
    account: Account,
    card: Card,
    executing: {
        type: "boolean",
Severity: Major
Found in docs/can-guides/experiment/atm/5-transactions-models/js.js and 6 other locations - About 2 days to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 79..141
docs/can-guides/experiment/atm/13-printing/js.js on lines 79..141
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 79..141
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 79..141
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 79..141
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 79..141

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

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

var Transaction = can.DefineMap.extend({
    account: Account,
    card: Card,
    executing: {
        type: "boolean",
Severity: Major
Found in docs/can-guides/experiment/atm/10-deposit-info/js.js and 6 other locations - About 2 days to fix
docs/can-guides/experiment/atm/13-printing/js.js on lines 79..141
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 79..141
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 79..141
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 79..141
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 79..141
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 79..141

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

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

var Transaction = can.DefineMap.extend({
    account: Account,
    card: Card,
    executing: {
        type: "boolean",
Severity: Major
Found in docs/can-guides/experiment/atm/8-choosing-transaction/js.js and 6 other locations - About 2 days to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 79..141
docs/can-guides/experiment/atm/13-printing/js.js on lines 79..141
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 79..141
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 79..141
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 79..141
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 79..141

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

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

var Transaction = can.DefineMap.extend({
    account: Account,
    card: Card,
    executing: {
        type: "boolean",
Severity: Major
Found in docs/can-guides/experiment/atm/7-reading-pin/js.js and 6 other locations - About 2 days to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 79..141
docs/can-guides/experiment/atm/13-printing/js.js on lines 79..141
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 79..141
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 79..141
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 79..141
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 79..141

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

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

var Transaction = can.DefineMap.extend({
    account: Account,
    card: Card,
    executing: {
        type: "boolean",
Severity: Major
Found in docs/can-guides/experiment/atm/9-picking-account/js.js and 6 other locations - About 2 days to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 79..141
docs/can-guides/experiment/atm/13-printing/js.js on lines 79..141
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 79..141
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 79..141
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 79..141
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 79..141

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

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

var Transaction = can.DefineMap.extend({
    account: Account,
    card: Card,
    executing: {
        type: "boolean",
Severity: Major
Found in docs/can-guides/experiment/atm/6-reading-card/js.js and 6 other locations - About 2 days to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 79..141
docs/can-guides/experiment/atm/13-printing/js.js on lines 79..141
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 79..141
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 79..141
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 79..141
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 79..141

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

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

  static props = {
    amount: { default: 9.99 },

    userCardNumber: String,

docs/can-guides/commitment/recipes/credit-card-simple/5-payment.js on lines 27..80

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

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

  static props = {
    amount: { default: 9.99 },

    userCardNumber: String,

docs/can-guides/commitment/recipes/credit-card-simple/4-validate-values.js on lines 27..80

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

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

  showOnlyWhenBlurredOnce(errorStream, blurredStream) {
    const errorEvent = errorStream.map(error => {
      if (!error) {
        return {
          type: "valid"
docs/can-guides/commitment/recipes/credit-card-advanced/4-card-blur.js on lines 71..130
docs/can-guides/commitment/recipes/credit-card-advanced/5-expiry.js on lines 123..182
docs/can-guides/commitment/recipes/credit-card-advanced/6-cvc.js on lines 167..226
docs/can-guides/commitment/recipes/credit-card-advanced/8-pay-button.js on lines 247..306
docs/can-guides/commitment/recipes/credit-card-advanced/9-disable-payments.js on lines 262..321

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

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

  showOnlyWhenBlurredOnce(errorStream, blurredStream) {
    const errorEvent = errorStream.map(error => {
      if (!error) {
        return {
          type: "valid"
docs/can-guides/commitment/recipes/credit-card-advanced/4-card-blur.js on lines 71..130
docs/can-guides/commitment/recipes/credit-card-advanced/5-expiry.js on lines 123..182
docs/can-guides/commitment/recipes/credit-card-advanced/7-disable-pay.js on lines 178..237
docs/can-guides/commitment/recipes/credit-card-advanced/8-pay-button.js on lines 247..306
docs/can-guides/commitment/recipes/credit-card-advanced/9-disable-payments.js on lines 262..321

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

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

  showOnlyWhenBlurredOnce(errorStream, blurredStream) {
    const errorEvent = errorStream.map(error => {
      if (!error) {
        return {
          type: "valid"
docs/can-guides/commitment/recipes/credit-card-advanced/4-card-blur.js on lines 71..130
docs/can-guides/commitment/recipes/credit-card-advanced/5-expiry.js on lines 123..182
docs/can-guides/commitment/recipes/credit-card-advanced/6-cvc.js on lines 167..226
docs/can-guides/commitment/recipes/credit-card-advanced/7-disable-pay.js on lines 178..237
docs/can-guides/commitment/recipes/credit-card-advanced/9-disable-payments.js on lines 262..321

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

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

    showOnlyWhenBlurredOnce(errorStream, blurredStream) {
        const errorEvent = errorStream.map(error => {
            if (!error) {
                return {
                    type: "valid"
docs/can-guides/commitment/recipes/credit-card-advanced/4-card-blur.js on lines 71..130
docs/can-guides/commitment/recipes/credit-card-advanced/5-expiry.js on lines 123..182
docs/can-guides/commitment/recipes/credit-card-advanced/6-cvc.js on lines 167..226
docs/can-guides/commitment/recipes/credit-card-advanced/7-disable-pay.js on lines 178..237
docs/can-guides/commitment/recipes/credit-card-advanced/8-pay-button.js on lines 247..306

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

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

  showOnlyWhenBlurredOnce(errorStream, blurredStream) {
    const errorEvent = errorStream.map(error => {
      if (!error) {
        return {
          type: "valid"
docs/can-guides/commitment/recipes/credit-card-advanced/4-card-blur.js on lines 71..130
docs/can-guides/commitment/recipes/credit-card-advanced/6-cvc.js on lines 167..226
docs/can-guides/commitment/recipes/credit-card-advanced/7-disable-pay.js on lines 178..237
docs/can-guides/commitment/recipes/credit-card-advanced/8-pay-button.js on lines 247..306
docs/can-guides/commitment/recipes/credit-card-advanced/9-disable-payments.js on lines 262..321

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

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

  showOnlyWhenBlurredOnce(errorStream, blurredStream) {
    const errorEvent = errorStream.map(error => {
      if (!error) {
        return {
          type: "valid"
docs/can-guides/commitment/recipes/credit-card-advanced/5-expiry.js on lines 123..182
docs/can-guides/commitment/recipes/credit-card-advanced/6-cvc.js on lines 167..226
docs/can-guides/commitment/recipes/credit-card-advanced/7-disable-pay.js on lines 178..237
docs/can-guides/commitment/recipes/credit-card-advanced/8-pay-button.js on lines 247..306
docs/can-guides/commitment/recipes/credit-card-advanced/9-disable-payments.js on lines 262..321

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

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

QUnit.asyncTest("Deposit", 6, function() {

    var card = new Card({
        number: "0123456789",
        pin: "1122"
Severity: Major
Found in docs/can-guides/experiment/atm/9-picking-account/js.js and 7 other locations - About 1 day to fix
docs/can-guides/experiment/atm/10-deposit-info/js.js on lines 339..379
docs/can-guides/experiment/atm/13-printing/js.js on lines 355..395
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 111..151
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 256..296
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 271..311
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 294..334
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 321..361

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

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

QUnit.asyncTest("Deposit", 6, function() {

    var card = new Card({
        number: "0123456789",
        pin: "1122"
Severity: Major
Found in docs/can-guides/experiment/atm/10-deposit-info/js.js and 7 other locations - About 1 day to fix
docs/can-guides/experiment/atm/13-printing/js.js on lines 355..395
docs/can-guides/experiment/atm/4-deposit-test/js.js on lines 111..151
docs/can-guides/experiment/atm/5-transactions-models/js.js on lines 256..296
docs/can-guides/experiment/atm/6-reading-card/js.js on lines 271..311
docs/can-guides/experiment/atm/7-reading-pin/js.js on lines 294..334
docs/can-guides/experiment/atm/8-choosing-transaction/js.js on lines 321..361
docs/can-guides/experiment/atm/9-picking-account/js.js on lines 332..372

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

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