docker/swarmkit

View on GitHub

Showing 1,820 of 1,820 total issues

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

func (s *Server) RemoveConfig(ctx context.Context, request *api.RemoveConfigRequest) (*api.RemoveConfigResponse, error) {
    if request.ConfigID == "" {
        return nil, status.Errorf(codes.InvalidArgument, "config ID must be provided")
    }

Severity: Major
Found in manager/controlapi/config.go and 1 other location - About 7 hrs to fix
manager/controlapi/secret.go on lines 192..241

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

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 *Server) RemoveSecret(ctx context.Context, request *api.RemoveSecretRequest) (*api.RemoveSecretResponse, error) {
    if request.SecretID == "" {
        return nil, status.Errorf(codes.InvalidArgument, "secret ID must be provided")
    }

Severity: Major
Found in manager/controlapi/secret.go and 1 other location - About 7 hrs to fix
manager/controlapi/config.go on lines 184..233

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

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

Method LogMessage.Unmarshal has 203 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (m *LogMessage) Unmarshal(dAtA []byte) error {
    l := len(dAtA)
    iNdEx := 0
    for iNdEx < l {
        preIndex := iNdEx
Severity: Major
Found in api/logbroker.pb.go - About 7 hrs to fix

    Function EventFromStoreAction has a Cognitive Complexity of 61 (exceeds 20 allowed). Consider refactoring.
    Open

    func EventFromStoreAction(sa StoreAction, oldObject StoreObject) (Event, error) {
        switch v := sa.Target.(type) {
        case *StoreAction_Node:
            switch sa.Action {
            case StoreActionKindCreate:
    Severity: Minor
    Found in api/objects.pb.go - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method StoreAction.Unmarshal has 82 return statements (exceeds 4 allowed).
    Open

    func (m *StoreAction) Unmarshal(dAtA []byte) error {
        l := len(dAtA)
        iNdEx := 0
        for iNdEx < l {
            preIndex := iNdEx
    Severity: Major
    Found in api/raft.pb.go - About 7 hrs to fix

      Method StoreSnapshot.MarshalToSizedBuffer has a Cognitive Complexity of 60 (exceeds 20 allowed). Consider refactoring.
      Open

      func (m *StoreSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
          i := len(dAtA)
          _ = i
          var l int
          _ = l
      Severity: Minor
      Found in api/snapshot.pb.go - About 6 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

      func skipCa(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/ca.pb.go and 10 other locations - About 6 hrs to fix
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipWatch(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/watch.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipResource(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/resource.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipDispatcher(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/dispatcher.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipSnapshot(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/snapshot.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipLogbroker(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/logbroker.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipRaft(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/raft.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipObjects(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/objects.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipPlugin(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in protobuf/plugin/plugin.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873

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

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

      func skipHealth(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/health.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/specs.pb.go on lines 9221..9298
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

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

      func skipSpecs(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/specs.pb.go and 10 other locations - About 6 hrs to fix
      api/ca.pb.go on lines 2345..2422
      api/dispatcher.pb.go on lines 5099..5176
      api/health.pb.go on lines 689..766
      api/logbroker.pb.go on lines 3809..3886
      api/objects.pb.go on lines 10049..10126
      api/raft.pb.go on lines 4496..4573
      api/resource.pb.go on lines 1144..1221
      api/snapshot.pb.go on lines 1528..1605
      api/watch.pb.go on lines 4796..4873
      protobuf/plugin/plugin.pb.go on lines 1190..1267

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

      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 (m *HealthCheckResponse) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Major
      Found in api/health.pb.go and 2 other locations - About 6 hrs to fix
      api/raft.pb.go on lines 3823..3891
      api/specs.pb.go on lines 5434..5502

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

      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 (m *ResolveAddressRequest) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Major
      Found in api/raft.pb.go and 2 other locations - About 6 hrs to fix
      api/health.pb.go on lines 620..688
      api/specs.pb.go on lines 5434..5502

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

      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 (m *ReplicatedService) Unmarshal(dAtA []byte) error {
          l := len(dAtA)
          iNdEx := 0
          for iNdEx < l {
              preIndex := iNdEx
      Severity: Major
      Found in api/specs.pb.go and 2 other locations - About 6 hrs to fix
      api/health.pb.go on lines 620..688
      api/raft.pb.go on lines 3823..3891

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

      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