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 {
- Read upRead up
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.
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
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 {
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 {
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 {
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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
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
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
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
- Read upRead up
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
- Read upRead up
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
- Read upRead up
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
- Read upRead up
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
- Read upRead up
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
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76