Showing 1,088 of 2,665 total issues
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return SecurityConst.errSSLInternal
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return response
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 1
Avoid too many return
statements within this function. Open
return 2
Avoid too many return
statements within this function. Open
return 0
Method Manager.run
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
func (m *Manager) run(ctx context.Context) {
for {
select {
case <-ctx.Done():
return
- 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 Beanstalk.collectTubesStats
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
func (b *Beanstalk) collectTubesStats(mx map[string]int64) error {
now := time.Now()
if now.Sub(b.lastDiscoverTubesTime) > b.discoverTubesEvery {
tubes, err := b.conn.queryListTubes()
- 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 Rethinkdb.collectStats
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
func (r *Rethinkdb) collectStats(mx map[string]int64) error {
resp, err := r.rdb.stats()
if err != nil {
return err
}
- 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 Traefik.collectEntrypointRequestDuration
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
func (t *Traefik) collectEntrypointRequestDuration(mx map[string]int64, pms prometheus.Series) {
if pms = pms.FindByNames(
metricEntrypointRequestDurationSecondsCount,
metricEntrypointRequestDurationSecondsSum,
); pms.Len() == 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"