knsv/mermaid

View on GitHub
cypress/integration/other/xss.spec.js

Summary

Maintainability
D
2 days
Test Coverage

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

  it('should sanitize colons properly', () => {
    cy.visit('http://localhost:9000/xss21.html');
    cy.wait(1000);
    cy.get('a').click('');
    cy.wait(1000);
Severity: Major
Found in cypress/integration/other/xss.spec.js and 1 other location - About 2 hrs to fix
cypress/integration/other/xss.spec.js on lines 121..127

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

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

  it('should sanitize colons properly', () => {
    cy.visit('http://localhost:9000/xss20.html');
    cy.wait(1000);
    cy.get('a').click('');
    cy.wait(1000);
Severity: Major
Found in cypress/integration/other/xss.spec.js and 1 other location - About 2 hrs to fix
cypress/integration/other/xss.spec.js on lines 128..134

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

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

  it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
    cy.visit('http://localhost:9000/xss13.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should sanitize cardinalities properly in class diagrams', () => {
    cy.visit('http://localhost:9000/xss18.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should sanitize backticks in class names properly', () => {
    cy.visit('http://localhost:9000/xss24.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

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

  it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
    cy.visit('http://localhost:9000/xss10.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow manipulating antiscript to run javascript iframes in class diagrams', () => {
    cy.visit('http://localhost:9000/xss14.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
    cy.visit('http://localhost:9000/xss11.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => {
    cy.visit('http://localhost:9000/xss12.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow changing the __proto__ attribute using config', () => {
    cy.visit('http://localhost:9000/xss2.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre wrapper', () => {
    cy.visit('http://localhost:9000/xss8.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow manipulating antiscript to run javascript', () => {
    cy.visit('http://localhost:9000/xss5.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow manipulating antiscript to run javascript using onerror', () => {
    cy.visit('http://localhost:9000/xss6.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 63..67
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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

  it('should not allow manipulating htmlLabels into a false positive', () => {
    cy.visit('http://localhost:9000/xss4.html');
    cy.wait(1000);
    cy.get('#the-malware').should('not.exist');
  });
Severity: Major
Found in cypress/integration/other/xss.spec.js and 11 other locations - About 55 mins to fix
cypress/integration/other/xss.spec.js on lines 58..62
cypress/integration/other/xss.spec.js on lines 68..72
cypress/integration/other/xss.spec.js on lines 73..77
cypress/integration/other/xss.spec.js on lines 78..82
cypress/integration/other/xss.spec.js on lines 91..95
cypress/integration/other/xss.spec.js on lines 96..100
cypress/integration/other/xss.spec.js on lines 101..105
cypress/integration/other/xss.spec.js on lines 106..110
cypress/integration/other/xss.spec.js on lines 111..115
cypress/integration/other/xss.spec.js on lines 116..120
cypress/integration/other/xss.spec.js on lines 135..139

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

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