Showing 2,161 of 2,161 total issues
Function TestCmdConfigRegionList
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
func TestCmdConfigRegionList(t *testing.T) {
var err error
var output bytes.Buffer
p := mock.NewProvider()
Function TestCmdConfigProjectSet
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
func TestCmdConfigProjectSet(t *testing.T) {
var err error
var output bytes.Buffer
p := mock.NewProvider()
Function TestCmdConfigMachineTypeList
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
func TestCmdConfigMachineTypeList(t *testing.T) {
var err error
var output bytes.Buffer
p := mock.NewProvider()
Function TestLogMamagerDelete
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
func TestLogMamagerDelete(t *testing.T) {
now := time.Now()
m := NewLogManager()
m.Logs = map[string][]LogEntry{
Method TaskListSubtasksParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *TaskListSubtasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method ComputeNodeDisableSchedulingParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ComputeNodeDisableSchedulingParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method ComputeNodeReimageParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ComputeNodeReimageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method ComputeNodeDeleteUserParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ComputeNodeDeleteUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method ComputeNodeRebootParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ComputeNodeRebootParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method CertificateGetParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *CertificateGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method CertificateListParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *CertificateListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method ComputeNodeGetParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ComputeNodeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method ComputeNodeAddUserParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ComputeNodeAddUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.requestTimeout)
var res []error
Method ResourcesCheckExistenceParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ResourcesCheckExistenceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
Method ResourcesGetParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ResourcesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
Method ResourcesDeleteParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *ResourcesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
Method VirtualMachineExtensionImagesListVersionsParams.WriteToRequest
has 10 return statements (exceeds 4 allowed). Open
func (o *VirtualMachineExtensionImagesListVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.timeout)
var res []error
Similar blocks of code found in 2 locations. Consider refactoring. Open
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
- 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 129.
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
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
- 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 129.
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 12 locations. Consider refactoring. Open
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
- 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 127.
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