rueian/rueidis

View on GitHub

Showing 522 of 673 total issues

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

func (c BitopKey) Key(key ...string) BitopKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_bitmap.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c WatchKey) Key(key ...string) WatchKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_transactions.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c FcallRoKey) Key(key ...string) FcallRoKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_scripting.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c SdiffstoreKey) Key(key ...string) SdiffstoreKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_set.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c DelKey) Key(key ...string) DelKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_generic.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c BzpopmaxKey) Key(key ...string) BzpopmaxKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_sorted_set.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c BrpopKey) Key(key ...string) BrpopKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_list.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c PfmergeSourcekey) Sourcekey(sourcekey ...string) PfmergeSourcekey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range sourcekey {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_hyperloglog.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c SunionstoreKey) Key(key ...string) SunionstoreKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_set.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c JsonMgetKey) Key(key ...string) JsonMgetKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_json.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c SsubscribeChannel) Channel(channel ...string) SsubscribeChannel {
    if c.ks&NoSlot == NoSlot {
        for _, k := range channel {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_pubsub.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c ExistsKey) Key(key ...string) ExistsKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_generic.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c TfcallKey) Key(key ...string) TfcallKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_triggers_and_functions.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c ZintercardKey) Key(key ...string) ZintercardKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_sorted_set.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c TdigestMergeSourceKey) SourceKey(sourceKey ...string) TdigestMergeSourceKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range sourceKey {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_tdigest.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c SinterKey) Key(key ...string) SinterKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_set.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c MgetKey) Key(key ...string) MgetKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_string.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c ZinterKey) Key(key ...string) ZinterKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_sorted_set.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c ZinterstoreKey) Key(key ...string) ZinterstoreKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_sorted_set.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 415..428
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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

func (c FcallKey) Key(key ...string) FcallKey {
    if c.ks&NoSlot == NoSlot {
        for _, k := range key {
            c.ks = NoSlot | slot(k)
            break
Severity: Major
Found in internal/cmds/gen_scripting.go and 45 other locations - About 1 hr to fix
internal/cmds/gen_bitmap.go on lines 395..408
internal/cmds/gen_cms.go on lines 203..216
internal/cmds/gen_generic.go on lines 98..111
internal/cmds/gen_generic.go on lines 168..181
internal/cmds/gen_generic.go on lines 1772..1785
internal/cmds/gen_generic.go on lines 1877..1890
internal/cmds/gen_hyperloglog.go on lines 72..85
internal/cmds/gen_hyperloglog.go on lines 134..147
internal/cmds/gen_json.go on lines 685..698
internal/cmds/gen_list.go on lines 116..129
internal/cmds/gen_list.go on lines 214..227
internal/cmds/gen_list.go on lines 266..279
internal/cmds/gen_list.go on lines 564..577
internal/cmds/gen_pubsub.go on lines 280..293
internal/cmds/gen_pubsub.go on lines 355..368
internal/cmds/gen_scripting.go on lines 34..47
internal/cmds/gen_scripting.go on lines 118..131
internal/cmds/gen_scripting.go on lines 221..234
internal/cmds/gen_scripting.go on lines 305..318
internal/cmds/gen_scripting.go on lines 506..519
internal/cmds/gen_set.go on lines 99..112
internal/cmds/gen_set.go on lines 156..169
internal/cmds/gen_set.go on lines 201..214
internal/cmds/gen_set.go on lines 236..249
internal/cmds/gen_set.go on lines 322..335
internal/cmds/gen_set.go on lines 692..705
internal/cmds/gen_set.go on lines 749..762
internal/cmds/gen_sorted_set.go on lines 29..42
internal/cmds/gen_sorted_set.go on lines 127..140
internal/cmds/gen_sorted_set.go on lines 179..192
internal/cmds/gen_sorted_set.go on lines 462..475
internal/cmds/gen_sorted_set.go on lines 538..551
internal/cmds/gen_sorted_set.go on lines 665..678
internal/cmds/gen_sorted_set.go on lines 787..800
internal/cmds/gen_sorted_set.go on lines 884..897
internal/cmds/gen_sorted_set.go on lines 1040..1053
internal/cmds/gen_sorted_set.go on lines 2351..2364
internal/cmds/gen_sorted_set.go on lines 2506..2519
internal/cmds/gen_stream.go on lines 1094..1107
internal/cmds/gen_stream.go on lines 1211..1224
internal/cmds/gen_string.go on lines 592..605
internal/cmds/gen_tdigest.go on lines 317..330
internal/cmds/gen_transactions.go on lines 82..95
internal/cmds/gen_triggers_and_functions.go on lines 34..47
internal/cmds/gen_triggers_and_functions.go on lines 120..133

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

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