Preparing report...

Report for github.com/puppetlabs/pvpool

A+    Excellent!    Found 16 issues across 39 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo97%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint58%

Golint is a linter for Go source code.

    • pvpool/pkg/controller/app/checkout_state.go
    • Line 23: warning: exported type CheckoutState should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 156: warning: exported method CheckoutState.Load should have comment or be unexported (golint)
    • Line 194: warning: exported method CheckoutState.Persist should have comment or be unexported (golint)
    • Line 234: warning: exported function NewCheckoutState should have comment or be unexported (golint)
    • Line 250: warning: exported function ConfigureCheckoutState should have comment or be unexported (golint)
    • pvpool/pkg/webhook/pool.go
    • Line 28: warning: exported method PoolValidator.ValidateCreate should have comment or be unexported (golint)
    • Line 39: warning: exported method PoolValidator.ValidateUpdate should have comment or be unexported (golint)
    • Line 55: warning: exported method PoolValidator.ValidateDelete should have comment or be unexported (golint)
    • Line 59: warning: exported function AddPoolValidatorToManager should have comment or be unexported (golint)
    • pvpool/pkg/apis/pvpool.puppet.com/v1alpha1/obj/checkout.go
    • Line 12: warning: exported var CheckoutKind should have comment or be unexported (golint)
    • Line 14: warning: exported type Checkout should have comment or be unexported (golint)
    • Line 27: warning: exported method Checkout.Copy should have comment or be unexported (golint)
    • Line 31: warning: exported method Checkout.PersistStatus should have comment or be unexported (golint)
    • Line 35: warning: exported method Checkout.Condition should have comment or be unexported (golint)
    • Line 44: warning: exported function NewCheckout should have comment or be unexported (golint)
    • Line 48: warning: exported function NewCheckoutFromObject should have comment or be unexported (golint)
    • Line 52: warning: exported function NewCheckoutPatcher should have comment or be unexported (golint)
    • pvpool/pkg/opt/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 37: warning: exported function NewConfig should have comment or be unexported (golint)
    • pvpool/pkg/controller/reconciler/checkout.go
    • Line 28: warning: exported type CheckoutReconciler should have comment or be unexported (golint)
    • Line 34: warning: exported method CheckoutReconciler.Reconcile should have comment or be unexported (golint)
    • Line 73: warning: exported function NewCheckoutReconciler should have comment or be unexported (golint)
    • Line 79: warning: exported function AddCheckoutReconcilerToManager should have comment or be unexported (golint)
    • pvpool/pkg/controller/reconciler/pool.go
    • Line 31: warning: exported const PoolReconcilerFinalizerName should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type PoolReconciler should have comment or be unexported (golint)
    • Line 40: warning: exported method PoolReconciler.Reconcile should have comment or be unexported (golint)
    • Line 88: warning: exported function NewPoolReconciler should have comment or be unexported (golint)
    • Line 94: warning: exported function AddPoolReconcilerToManager should have comment or be unexported (golint)
    • pvpool/pkg/apis/pvpool.puppet.com/v1alpha1/validation/validation.go
    • Line 17: warning: exported const MountJobSpecBackoffPolicy should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported function ValidatePersistentVolumeClaimTemplate should have comment or be unexported (golint)
    • Line 36: warning: exported function ValidateMountJob should have comment or be unexported (golint)
    • Line 64: warning: exported function ValidatePoolSpec should have comment or be unexported (golint)
    • Line 84: warning: exported function ValidatePoolSpecUpdate should have comment or be unexported (golint)
    • Line 90: warning: exported function ValidateCheckoutUpdate should have comment or be unexported (golint)
    • pvpool/pkg/controller/app/pool_replica.go
    • Line 24: warning: exported const PoolReplicaPhaseAnnotationKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported var DefaultPoolReplicaInitJobSpec should have comment or be unexported (golint)
    • Line 47: warning: exported type PoolReplica should have comment or be unexported (golint)
    • Line 58: warning: exported method PoolReplica.Delete should have comment or be unexported (golint)
    • Line 68: warning: exported method PoolReplica.Load should have comment or be unexported (golint)
    • Line 93: warning: exported method PoolReplica.Persist should have comment or be unexported (golint)
    • Line 138: warning: exported method PoolReplica.Stale should have comment or be unexported (golint)
    • Line 144: warning: exported method PoolReplica.Available should have comment or be unexported (golint)
    • Line 148: warning: exported function NewPoolReplica should have comment or be unexported (golint)
    • Line 156: warning: exported function ConfigurePoolReplica should have comment or be unexported (golint)
    • Line 236: warning: exported function ApplyPoolReplica should have comment or be unexported (golint)
    • Line 257: warning: exported type PoolReplicas should have comment or be unexported (golint)
    • Line 259: warning: exported method PoolReplicas.Pop should have comment or be unexported (golint)
    • Line 287: warning: exported type PoolReplicasSortByCreationTimestamp should have comment or be unexported (golint)
    • pvpool/pkg/controller/app/pool_state.go
    • Line 22: warning: exported type PoolState should have comment or be unexported (golint)
    • Line 36: warning: exported method PoolState.Delete should have comment or be unexported (golint)
    • Line 62: warning: exported method PoolState.Load should have comment or be unexported (golint)
    • Line 267: warning: exported method PoolState.Persist should have comment or be unexported (golint)
    • Line 287: warning: exported function NewPoolState should have comment or be unexported (golint)
    • Line 294: warning: exported function ConfigurePoolState should have comment or be unexported (golint)
    • pvpool/pkg/apis/pvpool.puppet.com/v1alpha1/obj/pool.go
    • Line 12: warning: exported var PoolKind should have comment or be unexported (golint)
    • Line 14: warning: exported type Pool should have comment or be unexported (golint)
    • Line 27: warning: exported method Pool.Copy should have comment or be unexported (golint)
    • Line 31: warning: exported method Pool.PersistStatus should have comment or be unexported (golint)
    • Line 35: warning: exported method Pool.Condition should have comment or be unexported (golint)
    • Line 44: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 48: warning: exported function NewPoolFromObject should have comment or be unexported (golint)
    • Line 52: warning: exported function NewPoolPatcher should have comment or be unexported (golint)
    • pvpool/pkg/webhook/checkout.go
    • Line 36: warning: exported method CheckoutValidator.ValidateCreate should have comment or be unexported (golint)
    • Line 40: warning: exported method CheckoutValidator.ValidateUpdate should have comment or be unexported (golint)
    • Line 56: warning: exported method CheckoutValidator.ValidateDelete should have comment or be unexported (golint)
    • Line 68: warning: exported method CheckoutRBACValidatorHandler.Handle should have comment or be unexported (golint)
    • Line 142: warning: exported method CheckoutRBACValidatorHandler.InjectDecoder should have comment or be unexported (golint)
    • Line 147: warning: exported method CheckoutRBACValidatorHandler.InjectMapper should have comment or be unexported (golint)
    • Line 152: warning: exported function AddCheckoutValidatorToManager should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!