coding-blocks/CBOnlineApp

View on GitHub
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt

Summary

Maintainability
D
1 day
Test Coverage

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

    var SP_PLAYBACK_SPEED: Float
        get() = prefs?.getFloat(PLAYBACK_SPEED, PLAYBACK_SPEED_DEFAULT) ?: PLAYBACK_SPEED_DEFAULT
        set(value) {
            prefs?.save(PLAYBACK_SPEED, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 72..76
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 84..88
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 89..93
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 99..103

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

    var SP_ROLE_ID: Int
        get() = prefs?.getInt(ROLE_ID, ROLE_ID_DEFAULT) ?: ROLE_ID_DEFAULT
        set(value) {
            prefs?.save(ROLE_ID, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 84..88
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 89..93
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 94..98
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 99..103

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

    var SP_PUSH_NOTIFICATIONS: Boolean
        get() = prefs?.getBoolean(NOTIFICATIONS, false) ?: false
        set(value) {
            prefs?.save(NOTIFICATIONS, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 10..14
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 78..82

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

    var SP_PIP: Boolean
        get() = prefs?.getBoolean(PIP, PIP_DEFAULT) ?: PIP_DEFAULT
        set(value) {
            prefs?.save(PIP, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 72..76
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 84..88
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 89..93
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 94..98

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

    var SP_AUTO_PLAY: Boolean
        get() = prefs?.getBoolean(AUTO_PLAY, false) ?: false
        set(value) {
            prefs?.save(AUTO_PLAY, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 42..46
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 78..82

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

    var SP_WIFI: Boolean
        get() = prefs?.getBoolean(WIFI, WIFI_DEFAULT) ?: WIFI_DEFAULT
        set(value) {
            prefs?.save(WIFI, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 72..76
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 89..93
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 94..98
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 99..103

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

    var SP_DATA_LIMIT: Float
        get() = prefs?.getFloat(DATA_LIMIT, DATA_LIMIT_DEFAULT) ?: DATA_LIMIT_DEFAULT
        set(value) {
            prefs?.save(DATA_LIMIT, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 72..76
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 84..88
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 94..98
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 99..103

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

    var SP_ADMIN: Boolean
        get() = prefs?.getBoolean(ADMIN, false) ?: false
        set(value) {
            prefs?.save(ADMIN, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 10..14
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 42..46

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

    var SP_ONEAUTH_ID: String
        get() = prefs?.getString(ONEAUTH_ID, ONEAUTH_ID) ?: ""
        set(value) {
            prefs?.save(ONEAUTH_ID, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 48..52
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 54..58
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 60..64
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 66..70

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

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

    var SP_EMAIL_ID: String
        get() = prefs?.getString(EMAIL_ID, EMAIL_ID) ?: ""
        set(value) {
            prefs?.save(EMAIL_ID, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 37..41
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 48..52
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 54..58
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 60..64

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

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

    var SP_USER_ID: String
        get() = prefs?.getString(USER_ID, USER_ID) ?: ""
        set(value) {
            prefs?.save(USER_ID, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 37..41
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 54..58
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 60..64
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 66..70

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

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

    var SP_NAME: String
        get() = prefs?.getString(NAME, NAME) ?: ""
        set(value) {
            prefs?.save(NAME, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 37..41
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 48..52
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 54..58
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 66..70

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

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

    var SP_USER_NAME: String
        get() = prefs?.getString(USER_NAME, USER_NAME) ?: ""
        set(value) {
            prefs?.save(USER_NAME, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 37..41
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 48..52
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 60..64
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 66..70

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

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

    var SP_JWT_REFRESH_TOKEN: String
        get() = prefs?.getString(REFRESH_TOKEN, "") ?: ""
        set(value) {
            prefs?.save(REFRESH_TOKEN, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 15..19
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 21..25

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

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

    var SP_JWT_TOKEN_KEY: String
        get() = prefs?.getString(JWT_TOKEN, "") ?: ""
        set(value) {
            prefs?.save(JWT_TOKEN, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 15..19
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 27..31

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

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

    var SP_ACCESS_TOKEN_KEY: String
        get() = prefs?.getString(ACCESS_TOKEN, "") ?: ""
        set(value) {
            prefs?.save(ACCESS_TOKEN, value)
        }
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 21..25
app/src/main/java/com/codingblocks/cbonlineapp/util/PreferenceHelper.kt on lines 27..31

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

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