Preparing report...

Report for github.com/knative/build-pipeline

A+    Excellent!    Found 125 issues across 616 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!


gocyclo93%

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.

    • build-pipeline/pkg/reconciler/pipelinerun/pipelinerun.go
    • Line 325: warning: cyclomatic complexity 39 of function (*Reconciler).reconcile() is high (> 15) (gocyclo)
    • Line 591: warning: cyclomatic complexity 18 of function (*Reconciler).runNextSchedulableTask() is high (> 15) (gocyclo)
    • Line 1082: warning: cyclomatic complexity 17 of function updatePipelineRunStatusFromTaskRuns() is high (> 15) (gocyclo)
    • Line 145: warning: cyclomatic complexity 16 of function (*Reconciler).ReconcileKind() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • build-pipeline/test/controller.go
    • Line 112: warning: exported function AddToInformer should have comment or be unexported (golint)
    • Line 158: warning: context.Context should be the first parameter of a function (golint)
    • Line 273: warning: exported type ResourceVersionReactor should have comment or be unexported (golint)
    • Line 277: warning: exported method ResourceVersionReactor.Handles should have comment or be unexported (golint)
    • build-pipeline/pkg/remote/oci/resolver.go
    • Line 38: warning: exported const KindAnnotation should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported method Resolver.List should have comment or be unexported (golint)
    • Line 86: warning: exported method Resolver.Get should have comment or be unexported (golint)
    • build-pipeline/pkg/apis/config/artifact_bucket.go
    • Line 26: warning: comment on exported const BucketLocationKey should be of the form "BucketLocationKey ..." (golint)
    • Line 41: warning: comment on exported const DefaultBucketServiceFieldName should be of the form "DefaultBucketServiceFieldName ..." (golint)
    • Line 44: warning: comment on exported const BucketServiceAccountFieldNameKey should be of the form "BucketServiceAccountFieldNameKey ..." (golint)
    • Line 50: warning: comment on exported type ArtifactBucket should be of the form "ArtifactBucket ..." (with optional leading article) (golint)
    • build-pipeline/pkg/apis/pipeline/v1alpha1/pipelinerun_conversion.go
    • Line 17: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 57: warning: exported method PipelineRunSpec.ConvertTo should have comment or be unexported (golint)
    • Line 77: warning: receiver name sink should be consistent with previous receiver name source for PipelineRun (golint)
    • Line 98: warning: exported method PipelineRunSpec.ConvertFrom should have comment or be unexported (golint)
    • Line 98: warning: receiver name sink should be consistent with previous receiver name source for PipelineRunSpec (golint)
    • build-pipeline/pkg/apis/pipeline/v1alpha1/taskrun_conversion.go
    • Line 17: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 45: warning: exported method TaskRunSpec.ConvertTo should have comment or be unexported (golint)
    • Line 118: warning: receiver name sink should be consistent with previous receiver name source for TaskRun (golint)
    • Line 132: warning: exported method TaskRunSpec.ConvertFrom should have comment or be unexported (golint)
    • Line 132: warning: receiver name sink should be consistent with previous receiver name source for TaskRunSpec (golint)
    • build-pipeline/pkg/apis/pipeline/v1beta1/task_validation.go
    • Line 37: warning: exported method Task.Validate should have comment or be unexported (golint)
    • Line 42: warning: exported method TaskSpec.Validate should have comment or be unexported (golint)
    • Line 75: warning: exported method TaskResult.Validate should have comment or be unexported (golint)
    • Line 155: warning: exported function ValidateVolumes should have comment or be unexported (golint)
    • Line 223: warning: exported function ValidateParameterTypes should have comment or be unexported (golint)
    • Line 230: warning: exported method ParamSpec.ValidateType should have comment or be unexported (golint)
    • Line 256: warning: exported function ValidateParameterVariables should have comment or be unexported (golint)
    • Line 284: warning: exported function ValidateResourcesVariables should have comment or be unexported (golint)
    • build-pipeline/pkg/apis/config/artifact_pvc.go
    • Line 66: warning: comment on exported function NewArtifactPVCFromMap should be of the form "NewArtifactPVCFromMap ..." (golint)
    • Line 83: warning: comment on exported function NewArtifactPVCFromConfigMap should be of the form "NewArtifactPVCFromConfigMap ..." (golint)
    • build-pipeline/pkg/apis/pipeline/v1alpha1/task_conversion.go
    • Line 17: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 41: warning: exported method TaskSpec.ConvertTo should have comment or be unexported (golint)
    • Line 105: warning: receiver name sink should be consistent with previous receiver name source for Task (golint)
    • Line 115: warning: exported method TaskSpec.ConvertFrom should have comment or be unexported (golint)
    • Line 115: warning: receiver name sink should be consistent with previous receiver name source for TaskSpec (golint)
    • build-pipeline/pkg/apis/pipeline/v1alpha1/task_types.go
    • Line 34: warning: exported method Task.TaskSpec should have comment or be unexported (golint)
    • Line 38: warning: exported method Task.TaskMetadata should have comment or be unexported (golint)
    • Line 42: warning: exported method Task.Copy should have comment or be unexported (golint)
    • Line 67: warning: exported type Sidecar should have comment or be unexported (golint)
    • build-pipeline/pkg/apis/pipeline/v1alpha1/pipeline_conversion.go
    • Line 17: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 30: warning: exported const FinallyFieldName should have comment or be unexported (golint)
    • Line 55: warning: exported method PipelineSpec.ConvertTo should have comment or be unexported (golint)
    • Line 72: warning: exported method PipelineTask.ConvertTo should have comment or be unexported (golint)
    • Line 92: warning: receiver name sink should be consistent with previous receiver name source for Pipeline (golint)
    • Line 105: warning: exported method PipelineSpec.ConvertFrom should have comment or be unexported (golint)
    • Line 105: warning: receiver name sink should be consistent with previous receiver name source for PipelineSpec (golint)
    • Line 121: warning: exported method PipelineTask.ConvertFrom should have comment or be unexported (golint)
    • Line 121: warning: receiver name sink should be consistent with previous receiver name source for PipelineTask (golint)
    • build-pipeline/pkg/substitution/substitution.go
    • Line 32: warning: exported function ValidateVariable should have comment or be unexported (golint)
    • Line 47: warning: exported function ValidateVariableP should have comment or be unexported (golint)
    • Line 63: warning: comment on exported function ValidateVariableProhibited should be of the form "ValidateVariableProhibited ..." (golint)
    • Line 79: warning: exported function ValidateVariableProhibitedP should have comment or be unexported (golint)
    • Line 95: warning: comment on exported function ValidateVariableIsolated should be of the form "ValidateVariableIsolated ..." (golint)
    • Line 114: warning: exported function ValidateVariableIsolatedP should have comment or be unexported (golint)
    • Line 171: warning: exported function ApplyReplacements should have comment or be unexported (golint)
    • Line 182: warning: comment on exported function ApplyArrayReplacements should be of the form "ApplyArrayReplacements ..." (golint)
    • build-pipeline/pkg/apis/pipeline/v1alpha1/pipeline_types.go
    • Line 51: warning: comment on exported type TaskKind should be of the form "TaskKind ..." (with optional leading article) (golint)
    • Line 92: warning: exported method Pipeline.PipelineMetadata should have comment or be unexported (golint)
    • Line 96: warning: exported method Pipeline.PipelineSpec should have comment or be unexported (golint)
    • Line 100: warning: exported method Pipeline.Copy should have comment or be unexported (golint)
    • Line 153: warning: exported method PipelineTask.HashKey should have comment or be unexported (golint)
    • Line 157: warning: exported method PipelineTask.Deps should have comment or be unexported (golint)
    • Line 194: warning: exported type PipelineTaskList should have comment or be unexported (golint)
    • Line 196: warning: exported method PipelineTaskList.Items should have comment or be unexported (golint)
    • Line 204: warning: exported method PipelineTaskList.Deps should have comment or be unexported (golint)
    • build-pipeline/pkg/apis/pipeline/v1beta1/task_types.go
    • Line 55: warning: exported method Task.TaskSpec should have comment or be unexported (golint)
    • Line 59: warning: exported method Task.TaskMetadata should have comment or be unexported (golint)
    • Line 63: warning: exported method Task.Copy should have comment or be unexported (golint)
    • Line 167: warning: comment on exported type TaskList should be of the form "TaskList ..." (with optional leading article) (golint)
    • Line 191: warning: comment on exported type TaskKind should be of the form "TaskKind ..." (with optional leading article) (golint)
    • build-pipeline/pkg/apis/pipeline/v1beta1/pipeline_types.go
    • Line 57: warning: exported method Pipeline.PipelineMetadata should have comment or be unexported (golint)
    • Line 61: warning: exported method Pipeline.PipelineSpec should have comment or be unexported (golint)
    • Line 65: warning: exported method Pipeline.Copy should have comment or be unexported (golint)
    • Line 109: warning: exported type PipelineTaskMetadata should have comment or be unexported (golint)
    • Line 117: warning: exported type EmbeddedTask should have comment or be unexported (golint)
    • Line 271: warning: exported method PipelineTask.TaskSpecMetadata should have comment or be unexported (golint)
    • Line 275: warning: exported method PipelineTask.HashKey should have comment or be unexported (golint)
    • Line 279: warning: exported method PipelineTask.ValidateName should have comment or be unexported (golint)
    • Line 312: warning: exported method PipelineTask.Deps should have comment or be unexported (golint)
    • Line 360: warning: exported type PipelineTaskList should have comment or be unexported (golint)
    • Line 376: warning: exported method PipelineTaskList.Items should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!