Preparing report...

Report for github.com/Hikely/goptuna

A+    Excellent!    Found 17 issues across 74 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!


gocyclo89%

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.

    • goptuna/trial.go
    • Line 49: warning: cyclomatic complexity 18 of function (*Trial).isFixedParam() is high (> 15) (gocyclo)
    • goptuna/successivehalving/pruner_test.go
    • Line 413: warning: cyclomatic complexity 29 of function TestOptunaPruner_ReductionFactor() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 27 of function TestOptunaPruner_RungCheck() is high (> 15) (gocyclo)
    • Line 541: warning: cyclomatic complexity 23 of function TestOptunaPruner_MinEarlyStoppingRate() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 23 of function TestOptunaPruner_MinResource() is high (> 15) (gocyclo)
    • Line 10: warning: cyclomatic complexity 16 of function TestOptunaPruner_IntermediateValues() is high (> 15) (gocyclo)
    • Line 238: warning: cyclomatic complexity 16 of function TestOptunaPruner_FirstTrialIsNotPruned() is high (> 15) (gocyclo)
    • goptuna/rdb/storage.go
    • Line 248: warning: cyclomatic complexity 19 of function (*Storage).CloneTrial() is high (> 15) (gocyclo)
    • Line 734: warning: cyclomatic complexity 16 of function (*Storage).mergeTrialsORM() is high (> 15) (gocyclo)

golint90%

Golint is a linter for Go source code.

    • goptuna/dashboard/entity.go
    • Line 11: warning: exported type TrialParam should have comment or be unexported (golint)
    • Line 16: warning: exported type Attribute should have comment or be unexported (golint)
    • Line 21: warning: exported type IntermediateValue should have comment or be unexported (golint)
    • Line 26: warning: exported type FrozenTrial should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.

    • goptuna/study.go
    • Line 233: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 250: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 262: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 271: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 276: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 233: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 250: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 262: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 271: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • Line 276: warning: state.String undefined (type TrialState has no field or method String) (ineffassign)
    • goptuna/dashboard/staticfiles.go
    • Line 15: warning: no required module provides package github.com/Hikely/goptuna/dashboard/statik; to add it: (ineffassign)
    • Line 15: warning: could not import github.com/Hikely/goptuna/dashboard/statik (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!