brisket/brisket

View on GitHub

Showing 240 of 269 total issues

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

            it("renders the latest request", function(done) {
                bothReturn
                    .then(function() {
                        expect(ClientRenderer.render).toHaveBeenCalledWith(
                            jasmine.any(Layout),
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1062..1074

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

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("prepends a descendant element with a child view", function() {
                $descendantElement().append("<div class='some_element' />");
                parentView.createChildView(childView).andPrependItTo(".descendant");
                expect($descendantElement().children().first()).$toBe(childView.$el);
            });
Severity: Major
Found in spec/client/viewing/ViewRelationshipSpec.js and 1 other location - About 2 hrs to fix
spec/client/viewing/ViewRelationshipSpec.js on lines 215..219

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

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("appends a child view to a descendant element", function() {
                $descendantElement().append("<div class='some_element' />");
                parentView.createChildView(childView).andAppendItTo(".descendant");
                expect($descendantElement().children().last()).$toBe(childView.$el);
            });
Severity: Major
Found in spec/client/viewing/ViewRelationshipSpec.js and 1 other location - About 2 hrs to fix
spec/client/viewing/ViewRelationshipSpec.js on lines 221..225

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe("when router doesn't have errorViewMapping and there is an error", function() {

        beforeEach(function() {
            fakeRouter.errorViewMapping = null;

Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
spec/server/ServerRenderingWorkflowSpec.js on lines 605..619

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    describe("when router doesn't have errorViewMapping and there is an error", function() {

        beforeEach(function() {
            fakeRouter.errorViewMapping = null;

Severity: Major
Found in spec/server/ServerRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1212..1226

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

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

    function itDoesNotCleanUpLayout() {
        it("does NOT clean up layout", function(done) {
            handlerReturns
                .then(function() {
                    expect(Layout.prototype.close).not.toHaveBeenCalled();
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 2 hrs to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1298..1307
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1309..1318

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

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

    function secondRouteDoesNotCleanUpLayout() {
        it("does NOT clean up layout for second route", function(done) {
            secondReturns
                .then(function() {
                    expect(Layout.prototype.close).not.toHaveBeenCalled();
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 2 hrs to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1287..1296
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1298..1307

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

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

    function firstRouteDoesNotCleanUpLayout() {
        it("does NOT clean up layout for first route", function(done) {
            firstReturns
                .then(function() {
                    expect(Layout.prototype.close).not.toHaveBeenCalled();
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 2 other locations - About 2 hrs to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1287..1296
spec/client/client/ClientRenderingWorkflowSpec.js on lines 1309..1318

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

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

        describe("when Error object does NOT have stack property (i.e. old browsers)", function() {

            beforeEach(function() {
                error = errorWithoutStack();
                Errors.notify(error, mockRequest);
Severity: Major
Found in spec/client/errors/ErrorsSpec.js and 1 other location - About 2 hrs to fix
spec/client/errors/ErrorsSpec.js on lines 49..63

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

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

        describe("when Error object has stack property (i.e. Node, modern browser)", function() {

            beforeEach(function() {
                error = errorWithStack();
                Errors.notify(error, mockRequest);
Severity: Major
Found in spec/client/errors/ErrorsSpec.js and 1 other location - About 2 hrs to fix
spec/client/errors/ErrorsSpec.js on lines 65..79

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            it("renders the latest request", function(done) {
                bothReturn
                    .then(function() {
                        expect(ClientRenderer.render).toHaveBeenCalledWith(
                            jasmine.any(Layout),
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 901..912

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            it("renders the latest request", function(done) {
                bothReturn
                    .then(function() {
                        expect(ClientRenderer.render).toHaveBeenCalledWith(
                            jasmine.any(Layout),
Severity: Major
Found in spec/client/client/ClientRenderingWorkflowSpec.js and 1 other location - About 2 hrs to fix
spec/client/client/ClientRenderingWorkflowSpec.js on lines 966..977

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

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("renders title from view's page level data", function() {
                layout.defaultTitle = "Default Title";
                view = new ViewWithPageLevelData().withTitle("Title");
                html = ServerRenderer.render(layout, view, null, mockServerRequest);

Severity: Major
Found in spec/server/ServerRendererSpec.js and 1 other location - About 2 hrs to fix
spec/server/ServerRendererSpec.js on lines 272..278

Duplicated Code

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

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

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

Tuning

This issue has a mass of 75.

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("renders title from view's page level data", function() {
                layout.defaultTitle = "Default Title";
                view = new ViewWithPageLevelData().withTitle("Title");
                html = ServerRenderer.render(layout, view, null, mockServerRequest);

Severity: Major
Found in spec/server/ServerRendererSpec.js and 1 other location - About 2 hrs to fix
spec/server/ServerRendererSpec.js on lines 316..322

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

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

            it("javascript code link", function() {
                $link = $fixture.find("a[href^='javascript']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("hash links", function() {
                $link = $fixture.find("a[href^='#']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("mailto link", function() {
                $link = $fixture.find("a[href^='mailto']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("absolute path link", function() {
                $link = $fixture.find("a[href^='/']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("mailto link", function() {
                $link = $fixture.find("a[href^='mailto']");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 305..312
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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

            it("application links", function() {
                $link = $fixture.find("a.applink");
                expect($link).toExist();

                whenLinkClicked();
Severity: Major
Found in spec/client/client/SetupLinksAndPushStateSpec.js and 10 other locations - About 1 hr to fix
spec/client/client/SetupLinksAndPushStateSpec.js on lines 189..196
spec/client/client/SetupLinksAndPushStateSpec.js on lines 198..205
spec/client/client/SetupLinksAndPushStateSpec.js on lines 207..214
spec/client/client/SetupLinksAndPushStateSpec.js on lines 216..223
spec/client/client/SetupLinksAndPushStateSpec.js on lines 225..232
spec/client/client/SetupLinksAndPushStateSpec.js on lines 314..321
spec/client/client/SetupLinksAndPushStateSpec.js on lines 323..330
spec/client/client/SetupLinksAndPushStateSpec.js on lines 332..339
spec/client/client/SetupLinksAndPushStateSpec.js on lines 341..348
spec/client/client/SetupLinksAndPushStateSpec.js on lines 350..357

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

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