AlexsJones/gravitywell

View on GitHub
platform/v1-namespace.go

Summary

Maintainability
B
5 hrs
Test Coverage

Function execV1NamespaceResource has 94 lines of code (exceeds 50 allowed). Consider refactoring.
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 2 hrs 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

      Function execV1NamespaceResource has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func execV1NamespaceResource(k kubernetes.Interface, objdep *v1.Namespace, namespace string, opts configuration.Options, commandFlag configuration.CommandFlag) (state.State, error) {
      Severity: Minor
      Found in platform/v1-namespace.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status