ory-am/hydra

View on GitHub
jwk/registry_mock_test.go

Summary

Maintainability
B
5 hrs
Test Coverage

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

func (mr *MockInternalRegistryMockRecorder) Config() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockInternalRegistry)(nil).Config))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockInternalRegistryMockRecorder) KeyCipher() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyCipher", reflect.TypeOf((*MockInternalRegistry)(nil).KeyCipher))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockInternalRegistryMockRecorder) KeyManager() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyManager", reflect.TypeOf((*MockInternalRegistry)(nil).KeyManager))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockRegistryMockRecorder) Config() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockRegistry)(nil).Config))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockInternalRegistryMockRecorder) Logger() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Logger", reflect.TypeOf((*MockInternalRegistry)(nil).Logger))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockRegistryMockRecorder) KeyManager() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyManager", reflect.TypeOf((*MockRegistry)(nil).KeyManager))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockInternalRegistryMockRecorder) SoftwareKeyManager() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SoftwareKeyManager", reflect.TypeOf((*MockInternalRegistry)(nil).SoftwareKeyManager))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockInternalRegistryMockRecorder) Writer() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Writer", reflect.TypeOf((*MockInternalRegistry)(nil).Writer))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockRegistryMockRecorder) KeyCipher() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyCipher", reflect.TypeOf((*MockRegistry)(nil).KeyCipher))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

func (mr *MockRegistryMockRecorder) SoftwareKeyManager() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SoftwareKeyManager", reflect.TypeOf((*MockRegistry)(nil).SoftwareKeyManager))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 54..57
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206

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

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

func (mr *MockInternalRegistryMockRecorder) AuditLogger() *gomock.Call {
    mr.mock.ctrl.T.Helper()
    return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuditLogger", reflect.TypeOf((*MockInternalRegistry)(nil).AuditLogger))
}
Severity: Major
Found in jwk/registry_mock_test.go and 12 other locations - About 30 mins to fix
hsm/crypto11_mock_test.go on lines 68..71
hsm/crypto11_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 68..71
jwk/registry_mock_test.go on lines 82..85
jwk/registry_mock_test.go on lines 96..99
jwk/registry_mock_test.go on lines 110..113
jwk/registry_mock_test.go on lines 124..127
jwk/registry_mock_test.go on lines 138..141
jwk/registry_mock_test.go on lines 175..178
jwk/registry_mock_test.go on lines 189..192
jwk/registry_mock_test.go on lines 203..206
jwk/registry_mock_test.go on lines 217..220

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

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status