nicholasjackson/pipe

View on GitHub

Showing 57 of 59 total issues

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

func (mock *LoggerMock) ServerSuccessPublishFailed(in1 *pipe.Pipe, in2 *pipe.Action, in3 providers.Message, in4 error) {
    if mock.ServerSuccessPublishFailedFunc == nil {
        panic("moq: LoggerMock.ServerSuccessPublishFailedFunc is nil but Logger.ServerSuccessPublishFailed was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 1 other location - About 2 hrs to fix
logger/mock_logger.go on lines 737..756

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

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 (mock *LoggerMock) ServerFailPublishFailed(in1 *pipe.Pipe, in2 *pipe.Action, in3 providers.Message, in4 error) {
    if mock.ServerFailPublishFailedFunc == nil {
        panic("moq: LoggerMock.ServerFailPublishFailedFunc is nil but Logger.ServerFailPublishFailed was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 1 other location - About 2 hrs to fix
logger/mock_logger.go on lines 959..978

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerSuccessPublishSuccess(in1 *pipe.Pipe, in2 *pipe.Action, in3 providers.Message) {
    if mock.ServerSuccessPublishSuccessFunc == nil {
        panic("moq: LoggerMock.ServerSuccessPublishSuccessFunc is nil but Logger.ServerSuccessPublishSuccess was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 2 hrs to fix
logger/mock_logger.go on lines 698..715
logger/mock_logger.go on lines 780..797
logger/mock_logger.go on lines 920..937

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerFailPublish(in1 *pipe.Pipe, in2 *pipe.Action, in3 providers.Message) {
    if mock.ServerFailPublishFunc == nil {
        panic("moq: LoggerMock.ServerFailPublishFunc is nil but Logger.ServerFailPublish was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 2 hrs to fix
logger/mock_logger.go on lines 780..797
logger/mock_logger.go on lines 920..937
logger/mock_logger.go on lines 1002..1019

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerFailPublishSuccess(in1 *pipe.Pipe, in2 *pipe.Action, in3 providers.Message) {
    if mock.ServerFailPublishSuccessFunc == nil {
        panic("moq: LoggerMock.ServerFailPublishSuccessFunc is nil but Logger.ServerFailPublishSuccess was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 2 hrs to fix
logger/mock_logger.go on lines 698..715
logger/mock_logger.go on lines 920..937
logger/mock_logger.go on lines 1002..1019

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerSuccessPublish(in1 *pipe.Pipe, in2 *pipe.Action, in3 providers.Message) {
    if mock.ServerSuccessPublishFunc == nil {
        panic("moq: LoggerMock.ServerSuccessPublishFunc is nil but Logger.ServerSuccessPublish was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 2 hrs to fix
logger/mock_logger.go on lines 698..715
logger/mock_logger.go on lines 780..797
logger/mock_logger.go on lines 1002..1019

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerActionPublishSuccess(in1 *pipe.Pipe, in2 providers.Message) {
    if mock.ServerActionPublishSuccessFunc == nil {
        panic("moq: LoggerMock.ServerActionPublishSuccessFunc is nil but Logger.ServerActionPublishSuccess was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 2 other locations - About 1 hr to fix
logger/mock_logger.go on lines 589..604
logger/mock_logger.go on lines 819..834

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerActionPublish(in1 *pipe.Pipe, in2 providers.Message) {
    if mock.ServerActionPublishFunc == nil {
        panic("moq: LoggerMock.ServerActionPublishFunc is nil but Logger.ServerActionPublish was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 2 other locations - About 1 hr to fix
logger/mock_logger.go on lines 663..678
logger/mock_logger.go on lines 819..834

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerHandleMessageExpired(in1 *pipe.Pipe, in2 providers.Message) {
    if mock.ServerHandleMessageExpiredFunc == nil {
        panic("moq: LoggerMock.ServerHandleMessageExpiredFunc is nil but Logger.ServerHandleMessageExpired was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 2 other locations - About 1 hr to fix
logger/mock_logger.go on lines 589..604
logger/mock_logger.go on lines 663..678

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

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 (mock *LoggerMock) ServerSuccessPublishFailedCalls() []struct {
    In1 *pipe.Pipe
    In2 *pipe.Action
    In3 providers.Message
    In4 error
Severity: Major
Found in logger/mock_logger.go and 1 other location - About 1 hr to fix
logger/mock_logger.go on lines 761..777

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

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 (mock *LoggerMock) ServerFailPublishFailedCalls() []struct {
    In1 *pipe.Pipe
    In2 *pipe.Action
    In3 providers.Message
    In4 error
Severity: Major
Found in logger/mock_logger.go and 1 other location - About 1 hr to fix
logger/mock_logger.go on lines 983..999

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ProviderConnectionFailed(in1 providers.Provider, in2 error) {
    if mock.ProviderConnectionFailedFunc == nil {
        panic("moq: LoggerMock.ProviderConnectionFailedFunc is nil but Logger.ProviderConnectionFailed was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 2 other locations - About 1 hr to fix
logger/mock_logger.go on lines 554..569
logger/mock_logger.go on lines 1150..1165

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerUnableToListen(in1 providers.Provider, in2 error) {
    if mock.ServerUnableToListenFunc == nil {
        panic("moq: LoggerMock.ServerUnableToListenFunc is nil but Logger.ServerUnableToListen was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 2 other locations - About 1 hr to fix
logger/mock_logger.go on lines 449..464
logger/mock_logger.go on lines 554..569

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ProviderSubcriptionFailed(in1 providers.Provider, in2 error) {
    if mock.ProviderSubcriptionFailedFunc == nil {
        panic("moq: LoggerMock.ProviderSubcriptionFailedFunc is nil but Logger.ProviderSubcriptionFailed was just called")
    }
    callInfo := struct {
Severity: Major
Found in logger/mock_logger.go and 2 other locations - About 1 hr to fix
logger/mock_logger.go on lines 449..464
logger/mock_logger.go on lines 1150..1165

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerSuccessPublishSuccessCalls() []struct {
    In1 *pipe.Pipe
    In2 *pipe.Action
    In3 providers.Message
} {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 1 hr to fix
logger/mock_logger.go on lines 720..734
logger/mock_logger.go on lines 802..816
logger/mock_logger.go on lines 942..956

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerFailPublishCalls() []struct {
    In1 *pipe.Pipe
    In2 *pipe.Action
    In3 providers.Message
} {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 1 hr to fix
logger/mock_logger.go on lines 802..816
logger/mock_logger.go on lines 942..956
logger/mock_logger.go on lines 1024..1038

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerFailPublishSuccessCalls() []struct {
    In1 *pipe.Pipe
    In2 *pipe.Action
    In3 providers.Message
} {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 1 hr to fix
logger/mock_logger.go on lines 720..734
logger/mock_logger.go on lines 942..956
logger/mock_logger.go on lines 1024..1038

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

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

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

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

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

Refactorings

Further Reading

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

func (mock *LoggerMock) ServerSuccessPublishCalls() []struct {
    In1 *pipe.Pipe
    In2 *pipe.Action
    In3 providers.Message
} {
Severity: Major
Found in logger/mock_logger.go and 3 other locations - About 1 hr to fix
logger/mock_logger.go on lines 720..734
logger/mock_logger.go on lines 802..816
logger/mock_logger.go on lines 1024..1038

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

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 (l *LoggerImpl) ServerSuccessPublishFailed(pi *pipe.Pipe, a *pipe.Action, m providers.Message, err error) {
    l.logger.Error(
        "Publish success action failed",
        "action", "server_success_publish_failed",
        "pipe", pi.Name,
Severity: Major
Found in logger/server.go and 1 other location - About 1 hr to fix
logger/server.go on lines 169..179

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

func (l *LoggerImpl) ServerFailPublishFailed(pi *pipe.Pipe, a *pipe.Action, m providers.Message, err error) {
    l.logger.Error(
        "Publish fail action failed",
        "action", "server_fail_publish_fail",
        "pipe", pi.Name,
Severity: Major
Found in logger/server.go and 1 other location - About 1 hr to fix
logger/server.go on lines 134..144

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