resource-watch/query

View on GitHub

Showing 47 of 65 total issues

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

    cf_imazonalertsbyisoandregion: {
        uri: '/imazon-alerts/admin/${iso}/${id1}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
app/src/services/endpoints.js on lines 388..416
app/src/services/endpoints.js on lines 578..606
app/src/services/endpoints.js on lines 632..660

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

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

    cf_quiccalertsbyuse: {
        uri: '/quicc-alerts/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
app/src/services/endpoints.js on lines 334..362
app/src/services/endpoints.js on lines 388..416
app/src/services/endpoints.js on lines 578..606

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

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

    cf_quiccalertsbyisoandregion: {
        uri: '/quicc-alerts/admin/${iso}/${id1}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
app/src/services/endpoints.js on lines 334..362
app/src/services/endpoints.js on lines 388..416
app/src/services/endpoints.js on lines 632..660

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

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

    cf_imazonalertsbyuse: {
        uri: '/imazon-alerts/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 3 other locations - About 4 hrs to fix
app/src/services/endpoints.js on lines 334..362
app/src/services/endpoints.js on lines 578..606
app/src/services/endpoints.js on lines 632..660

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

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

    cf_quiccalertsbywdpa: {
        uri: '/quicc-alerts/wdpa/${id}',
        method: 'GET',
        arguments: [{
            name: 'id',
Severity: Major
Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
app/src/services/endpoints.js on lines 309..333
app/src/services/endpoints.js on lines 363..387
app/src/services/endpoints.js on lines 417..441
app/src/services/endpoints.js on lines 553..577
app/src/services/endpoints.js on lines 661..685

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

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

    cf_imazonalertsbygeostore: {
        uri: '/imazon-alerts',
        method: 'GET',
        arguments: [{
            name: 'geostore',
Severity: Major
Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
app/src/services/endpoints.js on lines 309..333
app/src/services/endpoints.js on lines 363..387
app/src/services/endpoints.js on lines 553..577
app/src/services/endpoints.js on lines 607..631
app/src/services/endpoints.js on lines 661..685

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

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

    cf_umdlossgainbyuse: {
        uri: '/terrai-alerts/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 1 other location - About 3 hrs to fix
app/src/services/endpoints.js on lines 818..842

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

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

    cf_imazonalertsbywdpa: {
        uri: '/imazon-alerts/wdpa/${id}',
        method: 'GET',
        arguments: [{
            name: 'id',
Severity: Major
Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
app/src/services/endpoints.js on lines 309..333
app/src/services/endpoints.js on lines 417..441
app/src/services/endpoints.js on lines 553..577
app/src/services/endpoints.js on lines 607..631
app/src/services/endpoints.js on lines 661..685

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

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

    cf_umdlossgainbyisoandregion: {
        uri: '/terrai-alerts/admin/${iso}/${id1}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 1 other location - About 3 hrs to fix
app/src/services/endpoints.js on lines 864..888

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

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

    cf_quiccalertsbygeostore: {
        uri: '/quicc-alerts',
        method: 'GET',
        arguments: [{
            name: 'geostore',
Severity: Major
Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
app/src/services/endpoints.js on lines 309..333
app/src/services/endpoints.js on lines 363..387
app/src/services/endpoints.js on lines 417..441
app/src/services/endpoints.js on lines 553..577
app/src/services/endpoints.js on lines 607..631

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

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

    cf_imazonalertsbyiso: {
        uri: '/imazon-alerts/admin/${iso}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
app/src/services/endpoints.js on lines 363..387
app/src/services/endpoints.js on lines 417..441
app/src/services/endpoints.js on lines 553..577
app/src/services/endpoints.js on lines 607..631
app/src/services/endpoints.js on lines 661..685

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

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

    cf_quiccalertsbyiso: {
        uri: '/quicc-alerts/admin/${iso}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 5 other locations - About 3 hrs to fix
app/src/services/endpoints.js on lines 309..333
app/src/services/endpoints.js on lines 363..387
app/src/services/endpoints.js on lines 417..441
app/src/services/endpoints.js on lines 607..631
app/src/services/endpoints.js on lines 661..685

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

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

    cf_prodeslossbyisoandregion: {
        uri: '/prodes-loss/admin/${iso}/${id1}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 20..40
app/src/services/endpoints.js on lines 58..78
app/src/services/endpoints.js on lines 122..142
app/src/services/endpoints.js on lines 160..180
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 262..282
app/src/services/endpoints.js on lines 506..526
app/src/services/endpoints.js on lines 712..732
app/src/services/endpoints.js on lines 750..770

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

    cf_viirsfiresbyisoandregion: {
        uri: '/viirs-active-fires/admin/${iso}/${id1}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 58..78
app/src/services/endpoints.js on lines 122..142
app/src/services/endpoints.js on lines 160..180
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 262..282
app/src/services/endpoints.js on lines 468..488
app/src/services/endpoints.js on lines 506..526
app/src/services/endpoints.js on lines 712..732
app/src/services/endpoints.js on lines 750..770

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

    cf_viirsfiresbyuse: {
        uri: '/viirs-active-fires/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 20..40
app/src/services/endpoints.js on lines 122..142
app/src/services/endpoints.js on lines 160..180
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 262..282
app/src/services/endpoints.js on lines 468..488
app/src/services/endpoints.js on lines 506..526
app/src/services/endpoints.js on lines 712..732
app/src/services/endpoints.js on lines 750..770

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

    cf_gladalertsbyuse: {
        uri: '/glad-alerts/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 20..40
app/src/services/endpoints.js on lines 58..78
app/src/services/endpoints.js on lines 122..142
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 262..282
app/src/services/endpoints.js on lines 468..488
app/src/services/endpoints.js on lines 506..526
app/src/services/endpoints.js on lines 712..732
app/src/services/endpoints.js on lines 750..770

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

    cf_prodeslossbyuse: {
        uri: '/prodes-loss/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 20..40
app/src/services/endpoints.js on lines 58..78
app/src/services/endpoints.js on lines 122..142
app/src/services/endpoints.js on lines 160..180
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 262..282
app/src/services/endpoints.js on lines 468..488
app/src/services/endpoints.js on lines 712..732
app/src/services/endpoints.js on lines 750..770

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

    cf_terraialertsbyuse: {
        uri: '/terrai-alerts/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 20..40
app/src/services/endpoints.js on lines 58..78
app/src/services/endpoints.js on lines 122..142
app/src/services/endpoints.js on lines 160..180
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 262..282
app/src/services/endpoints.js on lines 468..488
app/src/services/endpoints.js on lines 506..526
app/src/services/endpoints.js on lines 712..732

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

    cf_gladalertsbyisoandregion: {
        uri: '/glad-alerts/admin/${iso}/${id1}',
        method: 'GET',
        arguments: [{
            name: 'iso',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 20..40
app/src/services/endpoints.js on lines 58..78
app/src/services/endpoints.js on lines 160..180
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 262..282
app/src/services/endpoints.js on lines 468..488
app/src/services/endpoints.js on lines 506..526
app/src/services/endpoints.js on lines 712..732
app/src/services/endpoints.js on lines 750..770

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

    cf_guiralossbyuse: {
        uri: '/guira-loss/use/${name}/${id}',
        method: 'GET',
        arguments: [{
            name: 'name',
Severity: Major
Found in app/src/services/endpoints.js and 9 other locations - About 2 hrs to fix
app/src/services/endpoints.js on lines 20..40
app/src/services/endpoints.js on lines 58..78
app/src/services/endpoints.js on lines 122..142
app/src/services/endpoints.js on lines 160..180
app/src/services/endpoints.js on lines 224..244
app/src/services/endpoints.js on lines 468..488
app/src/services/endpoints.js on lines 506..526
app/src/services/endpoints.js on lines 712..732
app/src/services/endpoints.js on lines 750..770

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