Preparing report...

Report for github.com/wosai/ultron

A+    Excellent!    Found 12 issues across 35 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.

    • ultron/scheduler.go
    • Line 106: warning: cyclomatic complexity 19 of function (*scheduler).patrol() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 19 of function (*scheduler).stop() is high (> 15) (gocyclo)

golint68%

Golint is a linter for Go source code.

    • ultron/task.go
    • Line 24: warning: exported type Task should have comment or be unexported (golint)
    • Line 30: warning: exported function NewTask should have comment or be unexported (golint)
    • ultron/timer.go
    • Line 42: warning: exported type ConvertDTOFunc should have comment or be unexported (golint)
    • Line 49: warning: exported method UniformRandomTimer.Sleep should have comment or be unexported (golint)
    • Line 55: warning: exported method UniformRandomTimer.Name should have comment or be unexported (golint)
    • Line 59: warning: exported method GaussianRandomTimer.Sleep should have comment or be unexported (golint)
    • Line 66: warning: exported method GaussianRandomTimer.Name should have comment or be unexported (golint)
    • Line 70: warning: exported method NonstopTimer.Sleep should have comment or be unexported (golint)
    • Line 72: warning: exported method NonstopTimer.Name should have comment or be unexported (golint)
    • ultron/pkg/fastattacker/attacker.go
    • Line 40: warning: exported function NewFastHTTPAttacker should have comment or be unexported (golint)
    • Line 48: warning: exported method FastHTTPAttacker.Name should have comment or be unexported (golint)
    • Line 52: warning: exported method FastHTTPAttacker.Fire should have comment or be unexported (golint)
    • Line 85: warning: exported method FastHTTPAttacker.Apply should have comment or be unexported (golint)
    • Line 91: warning: exported function WithClient should have comment or be unexported (golint)
    • Line 97: warning: exported function WithCheckFunc should have comment or be unexported (golint)
    • Line 108: warning: exported function WithPrepareFunc should have comment or be unexported (golint)
    • Line 117: warning: exported function WithTimeout should have comment or be unexported (golint)
    • Line 124: warning: exported function CheckHTTPStatusCode should have comment or be unexported (golint)
    • ultron/pkg/statistics/statistics.go
    • Line 16: warning: exported const CurrentTPSTimeRange should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type AttackStatistician should have comment or be unexported (golint)
    • Line 62: warning: exported type SummaryReport should have comment or be unexported (golint)
    • Line 78: warning: exported type StatisticianGroup should have comment or be unexported (golint)
    • Line 84: warning: exported type Tag should have comment or be unexported (golint)
    • Line 89: warning: exported type Tags should have comment or be unexported (golint)
    • Line 127: warning: exported function NewAttackStatistician should have comment or be unexported (golint)
    • Line 190: warning: exported method AttackStatistician.Record should have comment or be unexported (golint)
    • Line 291: warning: exported method AttackStatistician.Report should have comment or be unexported (golint)
    • Line 380: warning: exported function NewStatisticianGroup should have comment or be unexported (golint)
    • Line 473: warning: exported method StatisticianGroup.SetTag should have comment or be unexported (golint)
    • Line 480: warning: exported method StatisticianGroup.Merge should have comment or be unexported (golint)
    • ultron/runner.go
    • Line 20: warning: exported type MasterRunner should have comment or be unexported (golint)
    • Line 27: warning: exported type SlaveRunner should have comment or be unexported (golint)
    • Line 33: warning: exported type LocalRunner should have comment or be unexported (golint)
    • Line 42: warning: exported type RunnerConfig should have comment or be unexported (golint)
    • Line 70: warning: exported function NewMasterRunner should have comment or be unexported (golint)
    • Line 90: warning: exported function NewSlaveRunner should have comment or be unexported (golint)
    • Line 195: warning: exported function NewLocalRunner should have comment or be unexported (golint)
    • ultron/stage.go
    • Line 8: warning: comment on exported type ExitConditions should be of the form "ExitConditions ..." (with optional leading article) (golint)
    • Line 28: warning: comment on exported type UniversalExitConditions should be of the form "UniversalExitConditions ..." (with optional leading article) (golint)
    • Line 34: warning: exported type V1StageConfig should have comment or be unexported (golint)
    • Line 44: warning: exported method UniversalExitConditions.Check should have comment or be unexported (golint)
    • Line 59: warning: exported method UniversalExitConditions.NeverStop should have comment or be unexported (golint)
    • Line 66: warning: exported function BuildStage should have comment or be unexported (golint)
    • Line 108: warning: exported method V1StageConfig.GetTimer should have comment or be unexported (golint)
    • Line 112: warning: exported method V1StageConfig.GetExitConditions should have comment or be unexported (golint)
    • Line 116: warning: exported method V1StageConfig.GetStrategy should have comment or be unexported (golint)
    • ultron/strategy.go
    • Line 49: warning: exported type AttackStrategyConvertDTOFunc should have comment or be unexported (golint)
    • Line 113: warning: receiver name fx should be consistent with previous receiver name fc for FixedConcurrentUsers (golint)
    • Line 132: warning: exported method FixedConcurrentUsers.Name should have comment or be unexported (golint)
    • Line 132: warning: receiver name fx should be consistent with previous receiver name fc for FixedConcurrentUsers (golint)
    • ultron/pkg/statistics/convert.go
    • Line 11: warning: exported function ConvertStatisticianGroup should have comment or be unexported (golint)
    • Line 36: warning: exported function NewStatisticianGroupFromDTO should have comment or be unexported (golint)
    • Line 50: warning: exported function ConvertAttackStatistician should have comment or be unexported (golint)
    • Line 88: warning: exported function NewAttackStatisticianFromDTO should have comment or be unexported (golint)
    • ultron/attacker.go
    • Line 66: warning: exported function NewHTTPAttacker should have comment or be unexported (golint)
    • Line 74: warning: exported method HTTPAttacker.Name should have comment or be unexported (golint)
    • Line 78: warning: exported method HTTPAttacker.Fire should have comment or be unexported (golint)
    • Line 117: warning: exported method HTTPAttacker.Apply should have comment or be unexported (golint)
    • Line 123: warning: exported function WithClient should have comment or be unexported (golint)
    • Line 129: warning: exported function WithPrepareFunc should have comment or be unexported (golint)
    • Line 138: warning: exported function WithCheckFuncs should have comment or be unexported (golint)
    • Line 149: warning: exported function WithDisableKeepAlives should have comment or be unexported (golint)
    • Line 157: warning: exported function WithTimeout should have comment or be unexported (golint)
    • Line 163: warning: exported function WithProxy should have comment or be unexported (golint)
    • ultron/plan.go
    • Line 51: warning: exported var ErrPlanClosed should have comment or be unexported (golint)
    • Line 55: warning: exported function NewPlan 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!


misspell91%

Misspell Finds commonly misspelled English words