Preparing report...

Report for github.com/GoogleCloudPlatform/flink-on-k8s-operator

A    Great!    Found 18 issues across 36 files

Tweet

gofmt86%

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


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!


gocyclo80%

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.

    • flink-on-k8s-operator/api/v1beta1/zz_generated.deepcopy.go
    • Line 557: warning: cyclomatic complexity 24 of function (*JobSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 458: warning: cyclomatic complexity 22 of function (*JobManagerSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 748: warning: cyclomatic complexity 20 of function (*TaskManagerSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 169: warning: cyclomatic complexity 16 of function (*FlinkClusterSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • flink-on-k8s-operator/controllers/flinkcluster_updater.go
    • Line 188: warning: cyclomatic complexity 146 of function (*ClusterStatusUpdater).deriveClusterStatus() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 25 of function (*ClusterStatusUpdater).getJobStatus() is high (> 15) (gocyclo)
    • Line 777: warning: cyclomatic complexity 21 of function (*ClusterStatusUpdater).isStatusChanged() is high (> 15) (gocyclo)
    • Line 87: warning: cyclomatic complexity 20 of function (*ClusterStatusUpdater).createStatusChangeEvents() is high (> 15) (gocyclo)

golint69%

Golint is a linter for Go source code.

    • flink-on-k8s-operator/controllers/flinkcluster_util.go
    • Line 40: warning: exported const ControlSavepointTriggerID should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: comment on exported const SavepointAgeForJobUpdateSec should be of the form "SavepointAgeForJobUpdateSec ..." (golint)
    • Line 54: warning: exported type UpdateState should have comment or be unexported (golint)
    • Line 57: warning: exported const UpdateStatePreparing should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell91%

Misspell Finds commonly misspelled English words