AlexsJones/gravitywell

View on GitHub

Showing 92 of 92 total issues

Function execV1ServiceAccountResource has 22 return statements (exceeds 4 allowed).
Open

func execV1ServiceAccountResource(k kubernetes.Interface, objdep *v1.ServiceAccount, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
    name := "ServiceAccount"

    client := k.CoreV1().ServiceAccounts(namespace)

Severity: Major
Found in platform/v1-serviceaccount.go - About 2 hrs to fix

    Function execV1StorageResource has 22 return statements (exceeds 4 allowed).
    Open

    func execV1StorageResource(k kubernetes.Interface, objdep *storagev1.StorageClass, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
        name := "StorageClass"
    
        client := k.StorageV1().StorageClasses()
    
    
    Severity: Major
    Found in platform/v1-storageclass.go - About 2 hrs to fix

      Function execV1AuthClusterRoleResouce has 22 return statements (exceeds 4 allowed).
      Open

      func execV1AuthClusterRoleResouce(k kubernetes.Interface, objdep *auth_v1.ClusterRole, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
          name := "ClusterRole"
      
          client := k.RbacV1().ClusterRoles()
      
      
      Severity: Major
      Found in platform/v1auth-clusterrole.go - About 2 hrs to fix

        Method Plan.clusterFirstDeploymentPlan has 74 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (p *Plan) clusterFirstDeploymentPlan() {
        
            for k, _ := range p.providerClusterReference {
                //Cloud provider name
                logger.Info(p.providerClusterReference[k].ProviderName)
        Severity: Minor
        Found in scheduler/planner/standard/plan.go - About 1 hr to fix

          Function execV1Job has 20 return statements (exceeds 4 allowed).
          Open

          func execV1Job(k kubernetes.Interface, objdep *batchv1.Job, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
              name := "Job"
          
              client := k.BatchV1().Jobs(namespace)
          
          
          Severity: Major
          Found in platform/v1-job.go - About 1 hr to fix

            Function execV1PodResource has 20 return statements (exceeds 4 allowed).
            Open

            func execV1PodResource(k kubernetes.Interface, objdep *v1.Pod, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
                name := "Pod"
            
                client := k.CoreV1().Pods(namespace)
            
            
            Severity: Major
            Found in platform/v1-pod.go - About 1 hr to fix

              Function execV1ConfigMapResource has 20 return statements (exceeds 4 allowed).
              Open

              func execV1ConfigMapResource(k kubernetes.Interface, objdep *v1.ConfigMap, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
                  name := "ConfigMap"
              
                  client := k.CoreV1().ConfigMaps(namespace)
              
              
              Severity: Major
              Found in platform/v1-configmap.go - About 1 hr to fix

                Function execV1Beta1CronJob has 20 return statements (exceeds 4 allowed).
                Open

                func execV1Beta1CronJob(k kubernetes.Interface, objdep *v1beta1.CronJob, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
                    name := "CronJob"
                
                    client := k.BatchV1beta1().CronJobs(namespace)
                
                
                Severity: Major
                Found in platform/v1beta1-cronjob.go - About 1 hr to fix

                  Function execV1NamespaceResource has 20 return statements (exceeds 4 allowed).
                  Open

                  func execV1NamespaceResource(k kubernetes.Interface, objdep *v1.Namespace, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
                      name := "Namespace"
                  
                      client := k.CoreV1().Namespaces()
                  
                  
                  Severity: Major
                  Found in platform/v1-namespace.go - About 1 hr to fix

                    Method AWSProvider.Create has 70 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func (awsp *AWSProvider) Create(clusterp kinds.ProviderCluster) error {
                    
                        ec := eks.New(awsp.AWSClient)
                    
                        //SecurityGroupID
                    Severity: Minor
                    Found in platform/provider/aws/create.go - About 1 hr to fix

                      Method GCPProvider.Create has 67 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (g *GCPProvider) Create(clusterp kinds.ProviderCluster) error {
                      
                          //Convert generic node pool type into a specific GCP resource
                          var convertedNodePool []*containerpb.NodePool
                      
                      
                      Severity: Minor
                      Found in platform/provider/gcp/create.go - About 1 hr to fix

                        Function main has 64 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func main() {
                            isEnabled := true
                            isColorEnabled := true
                        
                            err := os.Setenv("GW_VERSION", fmt.Sprintf("Build version: %s", version))
                        Severity: Minor
                        Found in main.go - About 1 hr to fix

                          Function GenerateDeploymentPlan has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func GenerateDeploymentPlan(k kubernetes.Interface,
                              files []string, namespace string, opts configuration.Options,
                              commandFlag configuration.CommandFlag, shouldAwaitDeployment bool) error {
                          
                              var kubernetesResources []runtime.Object
                          Severity: Minor
                          Found in platform/kubernetes.go - About 1 hr to fix

                            Function DeployFromObject has 57 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func DeployFromObject(k kubernetes.Interface, obj runtime.Object,
                                namespace string, opts configuration.Options,
                                commandFlag configuration.CommandFlag, shouldAwaitDeployment bool) (state.State, error) {
                            
                                var response state.State
                            Severity: Minor
                            Found in platform/kubernetes.go - About 1 hr to fix

                              Function main has 52 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func main() {
                              
                                  awsP := os.Getenv("AWS_DEFAULT_PROFILE")
                                  if awsP == "" {
                                      fmt.Printf("No default profile\n")
                              Severity: Minor
                              Found in integration_tests/cmd/main.go - About 1 hr to fix

                                Function MinikubeClusterProcessor has 10 return statements (exceeds 4 allowed).
                                Open

                                func MinikubeClusterProcessor(minikubeprovider *minikube.MiniKubeProvider,
                                    commandFlag configuration.CommandFlag, cluster kinds.ProviderCluster) error {
                                
                                    create := func() error {
                                
                                
                                Severity: Major
                                Found in scheduler/actions/provider-minikube.go - About 1 hr to fix

                                  Function GoogleCloudPlatformClusterProcessor has 10 return statements (exceeds 4 allowed).
                                  Open

                                  func GoogleCloudPlatformClusterProcessor(gcpProvider *gcp.GCPProvider,
                                      commandFlag configuration.CommandFlag,
                                      cluster kinds.ProviderCluster) error {
                                  
                                      create := func() error {
                                  Severity: Major
                                  Found in scheduler/actions/provider-gcp.go - About 1 hr to fix

                                    Function DigitalOceanClusterProcessor has 9 return statements (exceeds 4 allowed).
                                    Open

                                    func DigitalOceanClusterProcessor(digitalocean *digitalocean.DigitalOceanProvider,
                                        commandFlag configuration.CommandFlag,
                                        cluster kinds.ProviderCluster) error {
                                    
                                        create := func() error {
                                    Severity: Major
                                    Found in scheduler/actions/provider-digitalocean.go - About 55 mins to fix

                                      Function AmazonWebServicesClusterProcessor has 9 return statements (exceeds 4 allowed).
                                      Open

                                      func AmazonWebServicesClusterProcessor(awsprovider *awsprovider.AWSProvider,
                                          commandFlag configuration.CommandFlag,
                                          cluster kinds.ProviderCluster) error {
                                      
                                          create := func() error {
                                      Severity: Major
                                      Found in scheduler/actions/provider-aws.go - About 55 mins to fix

                                        Function NewConfigurationFromPath has 8 return statements (exceeds 4 allowed).
                                        Open

                                        func NewConfigurationFromPath(path string, ignoreFilters []string) (*Configuration, error) {
                                            fi, err := os.Stat(path)
                                            if err != nil {
                                                return nil, err
                                            }
                                        Severity: Major
                                        Found in configuration/configuration.go - About 50 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language