jkawamoto/roadie

View on GitHub

Showing 2,161 of 2,161 total issues

Method JobScheduleDeleteParams.WriteToRequest has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring.
Open

func (o *JobScheduleDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

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 TestQueues has 89 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func TestQueues(t *testing.T) {

    var err error
    ctx := context.Background()
    m := NewQueueManager()
Severity: Major
Found in cloud/mock/queue_test.go - About 2 hrs to fix

    Method PoolListParams.WriteToRequest has 88 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (o *PoolListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
    
        r.SetTimeout(o.requestTimeout)
        var res []error
    
    
    Severity: Major
    Found in cloud/azure/batch/client/pools/pool_list_parameters.go - About 2 hrs to fix

      Method PoolListPoolUsageMetricsParams.WriteToRequest has 88 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (o *PoolListPoolUsageMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
      
          r.SetTimeout(o.requestTimeout)
          var res []error
      
      

        Method JobListParams.WriteToRequest has 88 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (o *JobListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
        
            r.SetTimeout(o.requestTimeout)
            var res []error
        
        
        Severity: Major
        Found in cloud/azure/batch/client/jobs/job_list_parameters.go - About 2 hrs to fix

          Method JobScheduleListParams.WriteToRequest has 88 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (o *JobScheduleListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
          
              r.SetTimeout(o.requestTimeout)
              var res []error
          
          

            PoolListPoolUsageMetricsParams has 23 methods (exceeds 20 allowed). Consider refactoring.
            Open

            type PoolListPoolUsageMetricsParams struct {
            
                /*NrDollarFilter
                  An OData $filter clause. If this is not specified the response includes all pools that existed in the account in the time range of the returned aggregation intervals.
            
            

              PoolListParams has 23 methods (exceeds 20 allowed). Consider refactoring.
              Open

              type PoolListParams struct {
              
                  /*NrDollarExpand
                    An OData $expand clause.
              
              
              Severity: Minor
              Found in cloud/azure/batch/client/pools/pool_list_parameters.go - About 2 hrs to fix

                ComputeNodeListParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                Open

                type ComputeNodeListParams struct {
                
                    /*NrDollarFilter
                      An OData $filter clause..
                
                

                  ComputeNodeUpdateUserParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  type ComputeNodeUpdateUserParams struct {
                  
                      /*APIVersion
                        Client API Version.
                  
                  

                    JobListParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    type JobListParams struct {
                    
                        /*NrDollarExpand
                          An OData $expand clause.
                    
                    
                    Severity: Minor
                    Found in cloud/azure/batch/client/jobs/job_list_parameters.go - About 2 hrs to fix

                      JobListPreparationAndReleaseTaskStatusParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      type JobListPreparationAndReleaseTaskStatusParams struct {
                      
                          /*NrDollarFilter
                            An OData $filter clause.
                      
                      

                        ResourcesCreateOrUpdateParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        type ResourcesCreateOrUpdateParams struct {
                        
                            /*APIVersion
                              The API version to use for the operation.
                        
                        

                          FileDeleteFromComputeNodeParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          type FileDeleteFromComputeNodeParams struct {
                          
                              /*APIVersion
                                Client API Version.
                          
                          

                            JobScheduleListParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            type JobScheduleListParams struct {
                            
                                /*NrDollarExpand
                                  An OData $expand clause.
                            
                            

                              FileDeleteFromTaskParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              type FileDeleteFromTaskParams struct {
                              
                                  /*APIVersion
                                    Client API Version.
                              
                              
                              Severity: Minor
                              Found in cloud/azure/batch/client/files/file_delete_from_task_parameters.go - About 2 hrs to fix

                                VirtualMachineImagesListParams has 23 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                type VirtualMachineImagesListParams struct {
                                
                                    /*NrDollarFilter
                                      The filter to apply on the operation.
                                
                                

                                  Method PoolGetParams.WriteToRequest has 87 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func (o *PoolGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
                                  
                                      r.SetTimeout(o.requestTimeout)
                                      var res []error
                                  
                                  
                                  Severity: Major
                                  Found in cloud/azure/batch/client/pools/pool_get_parameters.go - About 2 hrs to fix

                                    Method JobGetParams.WriteToRequest has 87 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func (o *JobGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
                                    
                                        r.SetTimeout(o.requestTimeout)
                                        var res []error
                                    
                                    
                                    Severity: Major
                                    Found in cloud/azure/batch/client/jobs/job_get_parameters.go - About 2 hrs to fix

                                      Method JobScheduleGetParams.WriteToRequest has 87 lines of code (exceeds 50 allowed). Consider refactoring.
                                      Open

                                      func (o *JobScheduleGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
                                      
                                          r.SetTimeout(o.requestTimeout)
                                          var res []error
                                      
                                      
                                      Severity: Major
                                      Found in cloud/azure/batch/client/job_schedules/job_schedule_get_parameters.go - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language