Showing 611 of 2,161 total issues
Method FileListFromComputeNodeParams.WriteToRequest
has a Cognitive Complexity of 47 (exceeds 20 allowed). Consider refactoring. Open
func (o *FileListFromComputeNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
- 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 FileListFromTaskParams.WriteToRequest
has a Cognitive Complexity of 47 (exceeds 20 allowed). Consider refactoring. Open
func (o *FileListFromTaskParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
- 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
Function TestLogManagerGet
has 140 lines of code (exceeds 50 allowed). Consider refactoring. Open
func TestLogManagerGet(t *testing.T) {
now := time.Now()
m := NewLogManager()
Function TestCmdInit
has a Cognitive Complexity of 46 (exceeds 20 allowed). Consider refactoring. Open
func TestCmdInit(t *testing.T) {
var err error
var output bytes.Buffer
m := testMetadata(&output, nil)
- 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 ComputeNodeListParams.WriteToRequest
has a Cognitive Complexity of 46 (exceeds 20 allowed). Consider refactoring. Open
func (o *ComputeNodeListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
- 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 JobListPreparationAndReleaseTaskStatusParams.WriteToRequest
has a Cognitive Complexity of 46 (exceeds 20 allowed). Consider refactoring. Open
func (o *JobListPreparationAndReleaseTaskStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
- 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
Function TestArchive
has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring. Open
func TestArchive(t *testing.T) {
var err error
root := ".."
- 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 CertificateListParams.WriteToRequest
has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring. Open
func (o *CertificateListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
- 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
Function TestCmdTaskLog
has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring. Open
func TestCmdTaskLog(t *testing.T) {
var stdout bytes.Buffer
var stderr bytes.Buffer
p := mock.NewProvider()
- 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
Function TestCmdQueueLog
has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring. Open
func TestCmdQueueLog(t *testing.T) {
var stdout bytes.Buffer
var stderr bytes.Buffer
p := mock.NewProvider()
- 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
Function TestUploadSourceFiles
has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring. Open
func TestUploadSourceFiles(t *testing.T) {
var err error
m := testMetadata(nil, nil)
s, err := m.StorageManager()
- 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 mockStorageAccountServer.ServeHTTP
has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring. Open
func (m *mockStorageAccountServer) ServeHTTP(res http.ResponseWriter, req *http.Request) {
paths := strings.Split(strings.TrimPrefix(req.URL.Path, "/"), "/")
if len(paths) < 2 {
res.WriteHeader(http.StatusBadRequest)
- 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
Function TestPrintDirList
has a Cognitive Complexity of 42 (exceeds 20 allowed). Consider refactoring. Open
func TestPrintDirList(t *testing.T) {
var err error
var output bytes.Buffer
files := []string{
- 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
TaskGetParams
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
type TaskGetParams struct {
/*NrDollarExpand
An OData $expand clause.
File commands.go
has 573 lines of code (exceeds 500 allowed). Consider refactoring. Open
//
// commands.go
//
// Copyright (c) 2016-2017 Junpei Kawamoto
//
Function TestCmdInit
has 117 lines of code (exceeds 50 allowed). Consider refactoring. Open
func TestCmdInit(t *testing.T) {
var err error
var output bytes.Buffer
m := testMetadata(&output, nil)
Method BatchService.CreateJob
has 117 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (s *BatchService) CreateJob(ctx context.Context, name string) (err error) {
// 1. Check metadata, if error returns, it means no app exists, then upload.
// 2. If version metadata is old or snapshot, upload new version.
// 3. otherwise create url and use it.
Function TestLogManagerGet
has a Cognitive Complexity of 40 (exceeds 20 allowed). Consider refactoring. Open
func TestLogManagerGet(t *testing.T) {
now := time.Now()
m := NewLogManager()
- 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
PoolGetParams
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
type PoolGetParams struct {
/*NrDollarExpand
An OData $expand clause.
JobGetParams
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
type JobGetParams struct {
/*NrDollarExpand
An OData $expand clause.