xmidt-org/wrp-go

View on GitHub

Showing 224 of 224 total issues

Method Message.CodecEncodeSelf has a Cognitive Complexity of 528 (exceeds 20 allowed). Consider refactoring.
Open

func (x *Message) CodecEncodeSelf(e *codec1978.Encoder) {
    var h codecSelfer3232
    z, r := codec1978.GenHelper().Encoder(e)
    _, _, _ = h, z, r
    if z.EncBasicHandle().CheckCircularRef {
Severity: Minor
Found in messages_codec.go - About 1 wk 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

File messages_codec.go has 3371 lines of code (exceeds 500 allowed). Consider refactoring.
Open

//go:build go1.6
// +build go1.6

// Code generated by codecgen - DO NOT EDIT.

Severity: Major
Found in messages_codec.go - About 1 wk to fix

    Method SimpleRequestResponse.CodecEncodeSelf has a Cognitive Complexity of 404 (exceeds 20 allowed). Consider refactoring.
    Open

    func (x *SimpleRequestResponse) CodecEncodeSelf(e *codec1978.Encoder) {
        var h codecSelfer3232
        z, r := codec1978.GenHelper().Encoder(e)
        _, _, _ = h, z, r
        if z.EncBasicHandle().CheckCircularRef {
    Severity: Minor
    Found in messages_codec.go - About 1 wk 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 CRUD.CodecEncodeSelf has a Cognitive Complexity of 390 (exceeds 20 allowed). Consider refactoring.
    Open

    func (x *CRUD) CodecEncodeSelf(e *codec1978.Encoder) {
        var h codecSelfer3232
        z, r := codec1978.GenHelper().Encoder(e)
        _, _, _ = h, z, r
        if z.EncBasicHandle().CheckCircularRef {
    Severity: Minor
    Found in messages_codec.go - About 1 wk 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 SimpleEvent.CodecEncodeSelf has a Cognitive Complexity of 228 (exceeds 20 allowed). Consider refactoring.
    Open

    func (x *SimpleEvent) CodecEncodeSelf(e *codec1978.Encoder) {
        var h codecSelfer3232
        z, r := codec1978.GenHelper().Encoder(e)
        _, _, _ = h, z, r
        if z.EncBasicHandle().CheckCircularRef {
    Severity: Minor
    Found in messages_codec.go - About 4 days 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 Message.CodecEncodeSelf has 610 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (x *Message) CodecEncodeSelf(e *codec1978.Encoder) {
        var h codecSelfer3232
        z, r := codec1978.GenHelper().Encoder(e)
        _, _, _ = h, z, r
        if z.EncBasicHandle().CheckCircularRef {
    Severity: Major
    Found in messages_codec.go - About 2 days to fix

      Method SimpleRequestResponse.CodecEncodeSelf has 471 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (x *SimpleRequestResponse) CodecEncodeSelf(e *codec1978.Encoder) {
          var h codecSelfer3232
          z, r := codec1978.GenHelper().Encoder(e)
          _, _, _ = h, z, r
          if z.EncBasicHandle().CheckCircularRef {
      Severity: Major
      Found in messages_codec.go - About 2 days to fix

        Method CRUD.CodecEncodeSelf has 463 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (x *CRUD) CodecEncodeSelf(e *codec1978.Encoder) {
            var h codecSelfer3232
            z, r := codec1978.GenHelper().Encoder(e)
            _, _, _ = h, z, r
            if z.EncBasicHandle().CheckCircularRef {
        Severity: Major
        Found in messages_codec.go - About 2 days to fix

          Method SimpleEvent.CodecEncodeSelf has 281 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (x *SimpleEvent) CodecEncodeSelf(e *codec1978.Encoder) {
              var h codecSelfer3232
              z, r := codec1978.GenHelper().Encoder(e)
              _, _, _ = h, z, r
              if z.EncBasicHandle().CheckCircularRef {
          Severity: Major
          Found in messages_codec.go - About 1 day to fix

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

            func (x *ServiceAlive) CodecEncodeSelf(e *codec1978.Encoder) {
                var h codecSelfer3232
                z, r := codec1978.GenHelper().Encoder(e)
                _, _, _ = h, z, r
                if z.EncBasicHandle().CheckCircularRef {
            Severity: Major
            Found in messages_codec.go and 1 other location - About 7 hrs to fix
            messages_codec.go on lines 3210..3257

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

            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 (x *Unknown) CodecEncodeSelf(e *codec1978.Encoder) {
                var h codecSelfer3232
                z, r := codec1978.GenHelper().Encoder(e)
                _, _, _ = h, z, r
                if z.EncBasicHandle().CheckCircularRef {
            Severity: Major
            Found in messages_codec.go and 1 other location - About 7 hrs to fix
            messages_codec.go on lines 3084..3131

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

            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 Message.codecDecodeSelfFromArray has 197 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (x *Message) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
                var h codecSelfer3232
                z, r := codec1978.GenHelper().Decoder(d)
                _, _, _ = h, z, r
                var yyj33 int
            Severity: Major
            Found in messages_codec.go - About 6 hrs to fix

              Method CRUD.codecDecodeSelfFromArray has 153 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (x *CRUD) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
                  var h codecSelfer3232
                  z, r := codec1978.GenHelper().Decoder(d)
                  _, _, _ = h, z, r
                  var yyj27 int
              Severity: Major
              Found in messages_codec.go - About 5 hrs to fix

                Method SimpleRequestResponse.codecDecodeSelfFromArray has 153 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func (x *SimpleRequestResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
                    var h codecSelfer3232
                    z, r := codec1978.GenHelper().Decoder(d)
                    _, _, _ = h, z, r
                    var yyj27 int
                Severity: Major
                Found in messages_codec.go - About 5 hrs to fix

                  Method Message.codecDecodeSelfFromMap has a Cognitive Complexity of 47 (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (x *Message) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
                      var h codecSelfer3232
                      z, r := codec1978.GenHelper().Decoder(d)
                      _, _, _ = h, z, r
                      var yyhl3 bool = l >= 0
                  Severity: Minor
                  Found in messages_codec.go - About 4 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 CRUD.codecDecodeSelfFromMap has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (x *CRUD) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
                      var h codecSelfer3232
                      z, r := codec1978.GenHelper().Decoder(d)
                      _, _, _ = h, z, r
                      var yyhl3 bool = l >= 0
                  Severity: Minor
                  Found in messages_codec.go - About 4 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 SimpleRequestResponse.codecDecodeSelfFromMap has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (x *SimpleRequestResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
                      var h codecSelfer3232
                      z, r := codec1978.GenHelper().Decoder(d)
                      _, _, _ = h, z, r
                      var yyhl3 bool = l >= 0
                  Severity: Minor
                  Found in messages_codec.go - About 4 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 codecSelfer3232.decSliceSlicestring has a Cognitive Complexity of 42 (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (x codecSelfer3232) decSliceSlicestring(v *[][]string, d *codec1978.Decoder) {
                      var h codecSelfer3232
                      z, r := codec1978.GenHelper().Decoder(d)
                      _, _, _ = h, z, r
                  
                  
                  Severity: Minor
                  Found in messages_codec.go - About 3 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 Message.codecDecodeSelfFromArray has a Cognitive Complexity of 42 (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (x *Message) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
                      var h codecSelfer3232
                      z, r := codec1978.GenHelper().Decoder(d)
                      _, _, _ = h, z, r
                      var yyj33 int
                  Severity: Minor
                  Found in messages_codec.go - About 3 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 2 locations. Consider refactoring.
                  Open

                  func (x *ServiceAlive) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
                      var h codecSelfer3232
                      z, r := codec1978.GenHelper().Decoder(d)
                      _, _, _ = h, z, r
                      var yyj6 int
                  Severity: Major
                  Found in messages_codec.go and 1 other location - About 3 hrs to fix
                  messages_codec.go on lines 3306..3329

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

                  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