stikjs/stik-dom

View on GitHub

Showing 52 of 52 total issues

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

  describe("error", function(){
    it("should create a listener", function(){
      var template = jasmine.createSpyObj("template", ["addEventListener"]);

      var error = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
specs/node_spec.js on lines 643..657
specs/node_spec.js on lines 659..673
specs/node_spec.js on lines 675..689
specs/node_spec.js on lines 691..705
specs/node_spec.js on lines 707..721
specs/node_spec.js on lines 723..737
specs/node_spec.js on lines 739..753
specs/node_spec.js on lines 755..769
specs/node_spec.js on lines 771..785
specs/node_spec.js on lines 787..801
specs/node_spec.js on lines 819..833
specs/node_spec.js on lines 835..849
specs/node_spec.js on lines 851..865
specs/node_spec.js on lines 867..881
specs/node_spec.js on lines 883..897
specs/node_spec.js on lines 899..913
specs/node_spec.js on lines 915..929
specs/node_spec.js on lines 931..945

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

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

  describe("load", function(){
    it("should create a listener", function(){
      var template = jasmine.createSpyObj("template", ["addEventListener"]);

      var load = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
specs/node_spec.js on lines 643..657
specs/node_spec.js on lines 659..673
specs/node_spec.js on lines 675..689
specs/node_spec.js on lines 691..705
specs/node_spec.js on lines 707..721
specs/node_spec.js on lines 723..737
specs/node_spec.js on lines 739..753
specs/node_spec.js on lines 755..769
specs/node_spec.js on lines 771..785
specs/node_spec.js on lines 787..801
specs/node_spec.js on lines 803..817
specs/node_spec.js on lines 819..833
specs/node_spec.js on lines 851..865
specs/node_spec.js on lines 867..881
specs/node_spec.js on lines 883..897
specs/node_spec.js on lines 899..913
specs/node_spec.js on lines 915..929
specs/node_spec.js on lines 931..945

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

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

  describe("blur", function(){
    it("should create a listener", function(){
      var template = jasmine.createSpyObj("template", ["addEventListener"]);

      var blur = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
specs/node_spec.js on lines 643..657
specs/node_spec.js on lines 659..673
specs/node_spec.js on lines 675..689
specs/node_spec.js on lines 691..705
specs/node_spec.js on lines 707..721
specs/node_spec.js on lines 723..737
specs/node_spec.js on lines 739..753
specs/node_spec.js on lines 755..769
specs/node_spec.js on lines 787..801
specs/node_spec.js on lines 803..817
specs/node_spec.js on lines 819..833
specs/node_spec.js on lines 835..849
specs/node_spec.js on lines 851..865
specs/node_spec.js on lines 867..881
specs/node_spec.js on lines 883..897
specs/node_spec.js on lines 899..913
specs/node_spec.js on lines 915..929
specs/node_spec.js on lines 931..945

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

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

  describe("abort", function(){
    it("should create a listener", function(){
      var template = jasmine.createSpyObj("template", ["addEventListener"]);

      var abort = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
specs/node_spec.js on lines 643..657
specs/node_spec.js on lines 659..673
specs/node_spec.js on lines 675..689
specs/node_spec.js on lines 691..705
specs/node_spec.js on lines 707..721
specs/node_spec.js on lines 723..737
specs/node_spec.js on lines 739..753
specs/node_spec.js on lines 771..785
specs/node_spec.js on lines 787..801
specs/node_spec.js on lines 803..817
specs/node_spec.js on lines 819..833
specs/node_spec.js on lines 835..849
specs/node_spec.js on lines 851..865
specs/node_spec.js on lines 867..881
specs/node_spec.js on lines 883..897
specs/node_spec.js on lines 899..913
specs/node_spec.js on lines 915..929
specs/node_spec.js on lines 931..945

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

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

  describe("click", function(){
    it("should create a listener", function(){
      var template = jasmine.createSpyObj("template", ["addEventListener"]);

      var click = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 18 other locations - About 4 hrs to fix
specs/node_spec.js on lines 659..673
specs/node_spec.js on lines 675..689
specs/node_spec.js on lines 691..705
specs/node_spec.js on lines 707..721
specs/node_spec.js on lines 723..737
specs/node_spec.js on lines 739..753
specs/node_spec.js on lines 755..769
specs/node_spec.js on lines 771..785
specs/node_spec.js on lines 787..801
specs/node_spec.js on lines 803..817
specs/node_spec.js on lines 819..833
specs/node_spec.js on lines 835..849
specs/node_spec.js on lines 851..865
specs/node_spec.js on lines 867..881
specs/node_spec.js on lines 883..897
specs/node_spec.js on lines 899..913
specs/node_spec.js on lines 915..929
specs/node_spec.js on lines 931..945

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

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("with an array of classes", function(){
      var elm = document.createElement("div");
      elm.className = "active";

      var addClass = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 1 other location - About 3 hrs to fix
specs/node_spec.js on lines 169..180

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

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("with an array of classes", function(){
      var elm = document.createElement("div");
      elm.className = "should-be-active and-functional active";

      var removeClass = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 1 other location - About 3 hrs to fix
specs/node_spec.js on lines 90..101

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

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

    it("with a different class", function(){
      var elm = document.createElement("div");
      elm.className = "not-active";

      var toggleClass = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220

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

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

    it("with multiple classes", function(){
      var elm = document.createElement("div");
      elm.className = "active";

      var addClass = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

    it("with the class", function(){
      var elm = document.createElement("div");
      elm.className = "active";

      var addClassHelper = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

    it("with the class", function(){
      var elm = document.createElement("div");
      elm.className = "active";

      var removeClassHelper = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

    it("with the class", function(){
      var elm = document.createElement("div");
      elm.className = "active";

      var toggleClass = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 222..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 98.

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

    it("with a different class", function(){
      var elm = document.createElement("div");
      elm.className = "not-active";

      var removeClassHelper = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

    it("with multiple classes", function(){
      var elm = document.createElement("div");
      elm.className = "should-be-active active and-functional";

      var removeClass = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

    it("with a different class", function(){
      var elm = document.createElement("div");
      elm.className = "not-active";

      var addClassHelper = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

    it("removing the middle class", function(){
      var elm = document.createElement("div");
      elm.className = "cc-number visa identified";

      var removeClass = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 143..154
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

    it("with a close enough class", function(){
      var elm = document.createElement("div");
      elm.className = "active-by-click active";

      var removeClassHelper = stik.labs.dom({
Severity: Major
Found in specs/node_spec.js and 9 other locations - About 3 hrs to fix
specs/node_spec.js on lines 51..62
specs/node_spec.js on lines 64..75
specs/node_spec.js on lines 77..88
specs/node_spec.js on lines 117..128
specs/node_spec.js on lines 130..141
specs/node_spec.js on lines 156..167
specs/node_spec.js on lines 182..193
specs/node_spec.js on lines 209..220
specs/node_spec.js on lines 222..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 98.

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

Function serializeForm has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    return function serializeForm( form, asObj ){
      var i, j, q;
      if (!form || form.nodeName !== "FORM") {
        return;
      }
Severity: Major
Found in src/form.js - About 2 hrs to fix

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

        it("when visible", function(){
          var elm = document.createElement("div");
    
          var showHelper = stik.labs.dom({
            name: "show"
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 271..281

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

    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("with the class", function(){
          var elm = document.createElement("div");
          elm.className = "active";
    
          var hasClassHelper = stik.labs.dom({
    Severity: Major
    Found in specs/node_spec.js and 1 other location - About 2 hrs to fix
    specs/node_spec.js on lines 26..35

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

    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