Showing 92 of 92 total issues
Function execV1ServiceAccountResource
has 22 return statements (exceeds 4 allowed). Open
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)
Function execV1StorageResource
has 22 return statements (exceeds 4 allowed). Open
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()
Function execV1AuthClusterRoleResouce
has 22 return statements (exceeds 4 allowed). Open
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()
Method Plan.clusterFirstDeploymentPlan
has 74 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (p *Plan) clusterFirstDeploymentPlan() {
for k, _ := range p.providerClusterReference {
//Cloud provider name
logger.Info(p.providerClusterReference[k].ProviderName)
Function execV1Job
has 20 return statements (exceeds 4 allowed). Open
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)
Function execV1PodResource
has 20 return statements (exceeds 4 allowed). Open
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)
Function execV1ConfigMapResource
has 20 return statements (exceeds 4 allowed). Open
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)
Function execV1Beta1CronJob
has 20 return statements (exceeds 4 allowed). Open
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)
Function execV1NamespaceResource
has 20 return statements (exceeds 4 allowed). Open
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()
Method AWSProvider.Create
has 70 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (awsp *AWSProvider) Create(clusterp kinds.ProviderCluster) error {
ec := eks.New(awsp.AWSClient)
//SecurityGroupID
Method GCPProvider.Create
has 67 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (g *GCPProvider) Create(clusterp kinds.ProviderCluster) error {
//Convert generic node pool type into a specific GCP resource
var convertedNodePool []*containerpb.NodePool
Function main
has 64 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func main() {
isEnabled := true
isColorEnabled := true
err := os.Setenv("GW_VERSION", fmt.Sprintf("Build version: %s", version))
Function GenerateDeploymentPlan
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func GenerateDeploymentPlan(k kubernetes.Interface,
files []string, namespace string, opts configuration.Options,
commandFlag configuration.CommandFlag, shouldAwaitDeployment bool) error {
var kubernetesResources []runtime.Object
Function DeployFromObject
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
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
Function main
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func main() {
awsP := os.Getenv("AWS_DEFAULT_PROFILE")
if awsP == "" {
fmt.Printf("No default profile\n")
Function MinikubeClusterProcessor
has 10 return statements (exceeds 4 allowed). Open
Open
func MinikubeClusterProcessor(minikubeprovider *minikube.MiniKubeProvider,
commandFlag configuration.CommandFlag, cluster kinds.ProviderCluster) error {
create := func() error {
Function GoogleCloudPlatformClusterProcessor
has 10 return statements (exceeds 4 allowed). Open
Open
func GoogleCloudPlatformClusterProcessor(gcpProvider *gcp.GCPProvider,
commandFlag configuration.CommandFlag,
cluster kinds.ProviderCluster) error {
create := func() error {
Function DigitalOceanClusterProcessor
has 9 return statements (exceeds 4 allowed). Open
Open
func DigitalOceanClusterProcessor(digitalocean *digitalocean.DigitalOceanProvider,
commandFlag configuration.CommandFlag,
cluster kinds.ProviderCluster) error {
create := func() error {
Function AmazonWebServicesClusterProcessor
has 9 return statements (exceeds 4 allowed). Open
Open
func AmazonWebServicesClusterProcessor(awsprovider *awsprovider.AWSProvider,
commandFlag configuration.CommandFlag,
cluster kinds.ProviderCluster) error {
create := func() error {
Function NewConfigurationFromPath
has 8 return statements (exceeds 4 allowed). Open
Open
func NewConfigurationFromPath(path string, ignoreFilters []string) (*Configuration, error) {
fi, err := os.Stat(path)
if err != nil {
return nil, err
}