hoschi/sweetp-service-github-issues

View on GitHub
fixtures/method_all_state_closed.js

Summary

Maintainability
F
1 wk
Test Coverage

File method_all_state_closed.js has 1703 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var nock = require('nock');

nock('http://localhost:8800')
    .get('/services/test-github-issues/password/manager/get?key=github')
    .reply(200, {
Severity: Major
Found in fixtures/method_all_state_closed.js - About 4 days to fix

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

        }, {
            "url": "https://api.github.com/repos/sweetp/dashboard/issues/1",
            "labels_url": "https://api.github.com/repos/sweetp/dashboard/issues/1/labels{/name}",
            "comments_url": "https://api.github.com/repos/sweetp/dashboard/issues/1/comments",
            "events_url": "https://api.github.com/repos/sweetp/dashboard/issues/1/events",
    Severity: Major
    Found in fixtures/method_all_state_closed.js and 2 other locations - About 2 days to fix
    fixtures/method_all_state_closed.js on lines 1458..1533
    fixtures/method_all_state_closed.js on lines 1533..1608

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

    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

        }, {
            "url": "https://api.github.com/repos/sweetp/dashboard/issues/2",
            "labels_url": "https://api.github.com/repos/sweetp/dashboard/issues/2/labels{/name}",
            "comments_url": "https://api.github.com/repos/sweetp/dashboard/issues/2/comments",
            "events_url": "https://api.github.com/repos/sweetp/dashboard/issues/2/events",
    Severity: Major
    Found in fixtures/method_all_state_closed.js and 2 other locations - About 2 days to fix
    fixtures/method_all_state_closed.js on lines 1458..1533
    fixtures/method_all_state_closed.js on lines 1608..1683

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

    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

        }, {
            "url": "https://api.github.com/repos/sweetp/dashboard/issues/3",
            "labels_url": "https://api.github.com/repos/sweetp/dashboard/issues/3/labels{/name}",
            "comments_url": "https://api.github.com/repos/sweetp/dashboard/issues/3/comments",
            "events_url": "https://api.github.com/repos/sweetp/dashboard/issues/3/events",
    Severity: Major
    Found in fixtures/method_all_state_closed.js and 2 other locations - About 2 days to fix
    fixtures/method_all_state_closed.js on lines 1533..1608
    fixtures/method_all_state_closed.js on lines 1608..1683

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

    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

        }], {
            server: 'GitHub.com',
            date: 'Tue, 29 Jul 2014 10:30:19 GMT',
            'content-type': 'application/json; charset=utf-8',
            status: '200 OK',
    Severity: Major
    Found in fixtures/method_all_state_closed.js and 1 other location - About 3 hrs to fix
    fixtures/method_all_state_open.js on lines 656..679

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

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

    nock('http://localhost:8800')
        .get('/services/test-github-issues/password/manager/get?key=github')
        .reply(200, {
            "target": "/services/test-github-issues/password/manager/get",
            "query": "key=github",
    Severity: Major
    Found in fixtures/method_all_state_closed.js and 3 other locations - About 1 hr to fix
    fixtures/method_all.js on lines 3..16
    fixtures/method_all_state_open.js on lines 3..16
    fixtures/method_all_with_all_props.js on lines 3..16

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

    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