Showing 152 of 602 total issues
SubscriptionDetailed
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
type SubscriptionDetailed struct {
// available addons count
AvailableAddonsCount int32 `json:"AvailableAddonsCount,omitempty"`
Method GetAsyncParams.WriteToRequest
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
func (o *GetAsyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); 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 GetCurrentAsyncParams.WriteToRequest
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
func (o *GetCurrentAsyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); 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 DeleteByFilterAsyncParams.WriteToRequest
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
func (o *DeleteByFilterAsyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); 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 GetConsumersParams.WriteToRequest
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
func (o *GetConsumersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); 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 GetOrganizationAccessParams.WriteToRequest
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
func (o *GetOrganizationAccessParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); 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 GetInvoiceProfilesParams.WriteToRequest
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
func (o *GetInvoiceProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); 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
GetActivityLogsParams
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
type GetActivityLogsParams struct {
/*Entity*/
Entity *string
/*From*/
AgreementProductCollection
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
type AgreementProductCollection struct {
// agreements
Agreements []*ObjectReference `json:"Agreements"`
Function main
has 81 lines of code (exceeds 50 allowed). Consider refactoring. Open
func main() {
resp, err := http.Get("https://api.crayon.com/swagger/v1/swagger.json")
if err != nil {
panic(err)
}
Method GetProgramsParams.WriteToRequest
has 80 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (o *GetProgramsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
GetForSubcategoryParams
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type GetForSubcategoryParams struct {
/*Category*/
Category string
/*CurrencyCode*/
GetBillingStatementsParams
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type GetBillingStatementsParams struct {
/*From*/
From *strfmt.DateTime
/*InvoiceProfileID*/
GetCrayonAccountsParams
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type GetCrayonAccountsParams struct {
/*ConsumerID*/
ConsumerID *int32
/*CustomerTenantType*/
GetAwsAccountsParams
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type GetAwsAccountsParams struct {
/*ConsumerID*/
ConsumerID *int32
/*CustomerTenantType*/
Asset
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type Asset struct {
// asset type
// Enum: [Reservation Software Subscription]
AssetType string `json:"AssetType,omitempty"`
Subscription
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type Subscription struct {
// available addons count
AvailableAddonsCount int32 `json:"AvailableAddonsCount,omitempty"`
GetGroupedBillingStatementsParams
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
type GetGroupedBillingStatementsParams struct {
/*From*/
From *strfmt.DateTime
/*InvoiceProfileID*/
Method GetAgreementsParams.WriteToRequest
has 20 return statements (exceeds 4 allowed). Open
func (o *GetAgreementsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
Method GetProductContainersParams.WriteToRequest
has 19 return statements (exceeds 4 allowed). Open
func (o *GetProductContainersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}