jkawamoto/roadie

View on GitHub

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()
Severity: Minor
Found in command/config_test.go - About 1 hr to fix

    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()
    Severity: Minor
    Found in command/config_test.go - About 1 hr to fix

      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()
      Severity: Minor
      Found in command/config_test.go - About 1 hr to fix

        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{
        Severity: Minor
        Found in cloud/mock/log_test.go - About 1 hr to fix

          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
          
          
          Severity: Major
          Found in cloud/azure/batch/client/tasks/task_list_subtasks_parameters.go - About 1 hr to fix

            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
                    
                    
                    Severity: Major
                    Found in cloud/azure/batch/client/certificates/certificate_get_parameters.go - About 1 hr to fix

                      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
                                  }
                              Severity: Major
                              Found in cloud/azure/resource/client/resources/resources_get_parameters.go - About 1 hr to fix

                                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
                                    
                                    
                                    Severity: Minor
                                    Found in cloud/azure/subscriptions/models/tenant_id_description.go and 1 other location - About 1 hr to fix
                                    cloud/azure/compute/models/virtual_machine_status_code_count.go on lines 1..33

                                    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

                                    Further Reading

                                    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
                                    
                                    
                                    cloud/azure/subscriptions/models/tenant_id_description.go on lines 1..33

                                    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

                                    Further Reading

                                    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
                                    
                                    
                                    Severity: Major
                                    Found in cloud/azure/compute/models/vault_certificate.go and 11 other locations - About 55 mins to fix
                                    cloud/azure/batch/models/batch_error_detail.go on lines 1..31
                                    cloud/azure/batch/models/error_message.go on lines 1..31
                                    cloud/azure/batch/models/name_value_pair.go on lines 1..31
                                    cloud/azure/batch/models/recent_job.go on lines 1..31
                                    cloud/azure/compute/models/boot_diagnostics.go on lines 1..31
                                    cloud/azure/compute/models/boot_diagnostics_instance_view.go on lines 1..31
                                    cloud/azure/compute/models/inner_error.go on lines 1..31
                                    cloud/azure/compute/models/ssh_public_key.go on lines 1..31
                                    cloud/azure/compute/models/usage_name.go on lines 1..31
                                    cloud/azure/resource/models/resource_group_filter.go on lines 1..31
                                    cloud/azure/resource/models/tag_count.go on lines 1..31

                                    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

                                    Further Reading

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language