go-pluto/pluto

View on GitHub

Showing 84 of 184 total issues

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

func (s *service) constructState(logger log.Logger, sep string) error {

    // Find all files below this node's CRDT root layer.
    folders, err := filepath.Glob(filepath.Join(s.config.CRDTLayerRoot, "*"))
    if err != nil {
Severity: Major
Found in storage/service.go and 1 other location - About 1 day to fix
worker/service.go on lines 146..228

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) constructState(logger log.Logger, sep string) error {

    // Find all files below this node's CRDT root layer.
    folders, err := filepath.Glob(filepath.Join(s.config.CRDTLayerRoot, "*"))
    if err != nil {
Severity: Major
Found in worker/service.go and 1 other location - About 1 day to fix
storage/service.go on lines 150..232

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ProxyCreate(c *Connection, rawReq string) bool {

    // Prepare payload to send.
    payload := &imap.Command{
        Text:     rawReq,
Severity: Major
Found in distributor/service.go and 5 other locations - About 6 hrs to fix
distributor/service.go on lines 756..809
distributor/service.go on lines 872..925
distributor/service.go on lines 930..983
distributor/service.go on lines 1168..1221
distributor/service.go on lines 1226..1279

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ProxyExpunge(c *Connection, rawReq string) bool {

    // Prepare payload to send.
    payload := &imap.Command{
        Text:     rawReq,
Severity: Major
Found in distributor/service.go and 5 other locations - About 6 hrs to fix
distributor/service.go on lines 756..809
distributor/service.go on lines 814..867
distributor/service.go on lines 872..925
distributor/service.go on lines 930..983
distributor/service.go on lines 1226..1279

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ProxyList(c *Connection, rawReq string) bool {

    // Prepare payload to send.
    payload := &imap.Command{
        Text:     rawReq,
Severity: Major
Found in distributor/service.go and 5 other locations - About 6 hrs to fix
distributor/service.go on lines 756..809
distributor/service.go on lines 814..867
distributor/service.go on lines 872..925
distributor/service.go on lines 1168..1221
distributor/service.go on lines 1226..1279

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ProxySelect(c *Connection, rawReq string) bool {

    // Prepare payload to send.
    payload := &imap.Command{
        Text:     rawReq,
Severity: Major
Found in distributor/service.go and 5 other locations - About 6 hrs to fix
distributor/service.go on lines 814..867
distributor/service.go on lines 872..925
distributor/service.go on lines 930..983
distributor/service.go on lines 1168..1221
distributor/service.go on lines 1226..1279

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ProxyDelete(c *Connection, rawReq string) bool {

    // Prepare payload to send.
    payload := &imap.Command{
        Text:     rawReq,
Severity: Major
Found in distributor/service.go and 5 other locations - About 6 hrs to fix
distributor/service.go on lines 756..809
distributor/service.go on lines 814..867
distributor/service.go on lines 930..983
distributor/service.go on lines 1168..1221
distributor/service.go on lines 1226..1279

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ProxyStore(c *Connection, rawReq string) bool {

    // Prepare payload to send.
    payload := &imap.Command{
        Text:     rawReq,
Severity: Major
Found in distributor/service.go and 5 other locations - About 6 hrs to fix
distributor/service.go on lines 756..809
distributor/service.go on lines 814..867
distributor/service.go on lines 872..925
distributor/service.go on lines 930..983
distributor/service.go on lines 1168..1221

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ApplyCRDTUpd(applyChan <-chan comm.Msg, doneChan chan<- struct{}) {

    for {

        // Receive update message from
Severity: Major
Found in storage/service.go and 1 other location - About 2 hrs to fix
worker/service.go on lines 232..274

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) ApplyCRDTUpd(applyChan <-chan comm.Msg, doneChan chan<- struct{}) {

    for {

        // Receive update message from
Severity: Major
Found in worker/service.go and 1 other location - About 2 hrs to fix
storage/service.go on lines 237..279

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) StartTLS(c *Connection, req *imap.Request) bool {

    if len(req.Payload) > 0 {

        // If payload was not empty to STARTTLS command,
Severity: Major
Found in distributor/service.go and 1 other location - About 2 hrs to fix
distributor/service.go on lines 484..516

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

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

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

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

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

Refactorings

Further Reading

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

func (s *service) Capability(c *Connection, req *imap.Request) bool {

    if len(req.Payload) > 0 {

        // If payload was not empty to CAPABILITY command,
Severity: Major
Found in distributor/service.go and 1 other location - About 2 hrs to fix
distributor/service.go on lines 721..751

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

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

func _Node_Expunge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Command)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 370..386
imap/node.pb.go on lines 388..404
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 424..440
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 460..476
imap/node.pb.go on lines 478..494
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 514..530
imap/node.pb.go on lines 550..566

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

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

func _Node_Store_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Command)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 370..386
imap/node.pb.go on lines 388..404
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 424..440
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 460..476
imap/node.pb.go on lines 478..494
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 514..530
imap/node.pb.go on lines 532..548

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

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

func _Node_AppendAbort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Abort)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 370..386
imap/node.pb.go on lines 388..404
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 424..440
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 460..476
imap/node.pb.go on lines 478..494
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 532..548
imap/node.pb.go on lines 550..566

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

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

func _Node_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Command)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 370..386
imap/node.pb.go on lines 388..404
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 460..476
imap/node.pb.go on lines 478..494
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 514..530
imap/node.pb.go on lines 532..548
imap/node.pb.go on lines 550..566

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

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

func _Node_AppendBegin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Command)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 370..386
imap/node.pb.go on lines 388..404
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 424..440
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 460..476
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 514..530
imap/node.pb.go on lines 532..548
imap/node.pb.go on lines 550..566

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

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

func _Node_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Command)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 370..386
imap/node.pb.go on lines 388..404
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 424..440
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 478..494
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 514..530
imap/node.pb.go on lines 532..548
imap/node.pb.go on lines 550..566

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

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

func _Node_Prepare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Context)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 388..404
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 424..440
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 460..476
imap/node.pb.go on lines 478..494
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 514..530
imap/node.pb.go on lines 532..548
imap/node.pb.go on lines 550..566

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

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

func _Node_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(Context)
    if err := dec(in); err != nil {
        return nil, err
    }
Severity: Major
Found in imap/node.pb.go and 11 other locations - About 2 hrs to fix
comm/receiver.pb.go on lines 393..409
imap/node.pb.go on lines 370..386
imap/node.pb.go on lines 406..422
imap/node.pb.go on lines 424..440
imap/node.pb.go on lines 442..458
imap/node.pb.go on lines 460..476
imap/node.pb.go on lines 478..494
imap/node.pb.go on lines 496..512
imap/node.pb.go on lines 514..530
imap/node.pb.go on lines 532..548
imap/node.pb.go on lines 550..566

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

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