Preparing report...

Report for github.com/cc4i/mahjong0

A    Great!    Found 22 issues across 33 files

Tweet

gofmt87%

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!


gocyclo84%

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.

    • mahjong0/dice/engine/assembler.go
    • Line 265: warning: cyclomatic complexity 41 of function (*AssembleData).PullTile() is high (> 15) (gocyclo)
    • Line 653: warning: cyclomatic complexity 33 of function (*AssembleData).GenerateExecutePlan() is high (> 15) (gocyclo)
    • mahjong0/dice/engine/brewer.go
    • Line 378: warning: cyclomatic complexity 29 of function (*ExecutionPlan).CommandWrapperExecutor() is high (> 15) (gocyclo)
    • Line 587: warning: cyclomatic complexity 21 of function (*ExecutionPlan).ExtractValue() is high (> 15) (gocyclo)

golint39%

Golint is a linter for Go source code.

    • mahjong0/dice/apis/v1alpha1/repo.go
    • Line 5: warning: exported type Repo should have comment or be unexported (golint)
    • Line 10: warning: exported type License should have comment or be unexported (golint)
    • Line 13: warning: exported const Apache2 should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported method License.LicenseString should have comment or be unexported (golint)
    • Line 21: warning: exported type TileMetadata should have comment or be unexported (golint)
    • Line 35: warning: exported type HuMetadata should have comment or be unexported (golint)
    • mahjong0/mctl/cmd/executor.go
    • Line 17: warning: exported function RunGet should have comment or be unexported (golint)
    • Line 27: warning: exported function RunGetByVersion should have comment or be unexported (golint)
    • Line 33: warning: exported function RunPostByVersion should have comment or be unexported (golint)
    • Line 48: warning: exported function Run should have comment or be unexported (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 57: warning: exported function Connect2Dice should have comment or be unexported (golint)
    • Line 83: warning: exported function ExecCommand should have comment or be unexported (golint)
    • Line 96: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • mahjong0/dice/engine/assembler.go
    • Line 22: warning: exported type AssembleData should have comment or be unexported (golint)
    • Line 26: warning: comment on exported type AssembleCore should be of the form "AssembleCore ..." (with optional leading article) (golint)
    • Line 60: warning: exported var DiceConfig should have comment or be unexported (golint)
    • Line 102: warning: exported function UpdateDR should have comment or be unexported (golint)
    • Line 287: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 427: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 653: warning: exported method AssembleData.GenerateExecutePlan should have comment or be unexported (golint)
    • Line 848: warning: exported function ToFlow should have comment or be unexported (golint)
    • Line 859: warning: exported function ToParallelFlow should have comment or be unexported (golint)
    • Line 878: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • mahjong0/dice/engine/tsvalue.go
    • Line 13: warning: comment on exported type DeploymentStatus should be of the form "DeploymentStatus ..." (with optional leading article) (golint)
    • Line 17: warning: exported const Created should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported method DeploymentStatus.DSString should have comment or be unexported (golint)
    • Line 49: warning: comment on exported type TsLib should be of the form "TsLib ..." (with optional leading article) (golint)
    • Line 76: warning: comment on exported type TsInputParameter should be of the form "TsInputParameter ..." (with optional leading article) (golint)
    • Line 87: warning: comment on exported type TsManifests should be of the form "TsManifests ..." (with optional leading article) (golint)
    • Line 97: warning: comment on exported type TsOutput should be of the form "TsOutput ..." (with optional leading article) (golint)
    • Line 106: warning: comment on exported type TsOutputDetail should be of the form "TsOutputDetail ..." (with optional leading article) (golint)
    • Line 130: warning: comment on exported var AllTilesGrids should be of the form "AllTilesGrids ..." (golint)
    • Line 190: warning: exported function IsDependenciesDone should have comment or be unexported (golint)
    • Line 309: warning: comment on exported function ParentTileInstance should be of the form "ParentTileInstance ..." (golint)
    • Line 319: warning: exported function CDKAllValueRef should have comment or be unexported (golint)
    • Line 328: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 347: warning: exported function CDKValueRef should have comment or be unexported (golint)
    • mahjong0/dice/web/v1alphahandler.go
    • Line 110: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 176: warning: exported function Metadata should have comment or be unexported (golint)
    • Line 195: warning: exported function TileSpec should have comment or be unexported (golint)
    • Line 207: warning: exported function HuSpec should have comment or be unexported (golint)
    • Line 233: warning: exported function Plan should have comment or be unexported (golint)
    • Line 245: warning: exported function PlanOrder should have comment or be unexported (golint)
    • Line 251: warning: exported function ParallelOrder should have comment or be unexported (golint)
    • Line 260: warning: exported function TilesGrid should have comment or be unexported (golint)
    • mahjong0/dice/apis/v1alpha1/types.go
    • Line 5: warning: comment on exported type Category should be of the form "Category ..." (with optional leading article) (golint)
    • Line 9: warning: exported const Network should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported method Category.CString should have comment or be unexported (golint)
    • Line 24: warning: comment on exported type VendorService should be of the form "VendorService ..." (with optional leading article) (golint)
    • Line 28: warning: exported const EKS should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported method VendorService.VSString should have comment or be unexported (golint)
    • Line 38: warning: comment on exported type IOType should be of the form "IOType ..." (with optional leading article) (golint)
    • Line 42: warning: exported const String should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported method IOType.IOTString should have comment or be unexported (golint)
    • Line 53: warning: comment on exported type ManifestType should be of the form "ManifestType ..." (with optional leading article) (golint)
    • Line 57: warning: exported const K8s should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported method ManifestType.MTString should have comment or be unexported (golint)
    • mahjong0/mctl/cmd/list/repo.go
    • Line 5: warning: exported type License should have comment or be unexported (golint)
    • Line 8: warning: exported const Apache2 should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported method License.LicenseString should have comment or be unexported (golint)
    • Line 16: warning: exported type TileMetadata should have comment or be unexported (golint)
    • Line 30: warning: exported type HuMetadata should have comment or be unexported (golint)
    • mahjong0/mctl/cmd/initial/initial.go
    • Line 18: warning: exported var Init should have comment or be unexported (golint)
    • Line 28: warning: exported var Tile should have comment or be unexported (golint)
    • Line 37: warning: exported var Deployment should have comment or be unexported (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • mahjong0/dice/utils/s3copy.go
    • Line 15: warning: exported type S3Functions should have comment or be unexported (golint)
    • Line 33: warning: exported type HttpClient should have comment or be unexported (golint)
    • Line 37: warning: exported var Client should have comment or be unexported (golint)
    • Line 39: warning: exported method DiceConfig.LoadTile should have comment or be unexported (golint)
    • Line 46: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 60: warning: exported method DiceConfig.LoadTileS3 should have comment or be unexported (golint)
    • Line 85: warning: exported method DiceConfig.LoadTileDev should have comment or be unexported (golint)
    • Line 121: warning: exported method DiceConfig.LoadSuper should have comment or be unexported (golint)
    • Line 130: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 135: warning: exported method DiceConfig.LoadSuperS3 should have comment or be unexported (golint)
    • Line 158: warning: exported method DiceConfig.LoadSuperDev should have comment or be unexported (golint)
    • Line 164: warning: exported method DiceConfig.LoadTestOutput should have comment or be unexported (golint)
    • Line 174: warning: exported method DiceConfig.LoadTileSpec should have comment or be unexported (golint)
    • Line 181: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 186: warning: exported method DiceConfig.LoadTileSpecDev should have comment or be unexported (golint)
    • Line 196: warning: exported method DiceConfig.LoadTileSpecS3 should have comment or be unexported (golint)
    • Line 214: warning: exported method DiceConfig.LoadHuSpec should have comment or be unexported (golint)
    • Line 221: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 225: warning: exported method DiceConfig.LoadHuSpecDev should have comment or be unexported (golint)
    • Line 232: warning: exported method DiceConfig.LoadHuSpecS3 should have comment or be unexported (golint)
    • mahjong0/dice/utils/meta.go
    • Line 14: warning: exported function HusMetadata should have comment or be unexported (golint)
    • Line 96: warning: exported function TilesMetadata should have comment or be unexported (golint)
    • Line 120: warning: exported function AllTiles should have comment or be unexported (golint)
    • mahjong0/mctl/cmd/list/list.go
    • Line 22: warning: exported var TilesInRepo should have comment or be unexported (golint)
    • Line 46: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 58: warning: exported var HuInRepo should have comment or be unexported (golint)
    • Line 82: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 94: warning: exported var Deployment should have comment or be unexported (golint)
    • Line 136: warning: exported var Repo should have comment or be unexported (golint)
    • mahjong0/dice/engine/brewer.go
    • Line 58: warning: comment on exported const Command should be of the form "Command ..." (golint)
    • Line 62: warning: comment on exported method StageKind.SKString should be of the form "SKString ..." (golint)
    • Line 121: warning: exported method ExecutionPlan.RunPlan should have comment or be unexported (golint)
    • Line 132: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 192: warning: exported method ExecutionPlan.ExecuteParallelPlan should have comment or be unexported (golint)
    • Line 247: warning: exported method ExecutionPlan.ExtractAllEnv should have comment or be unexported (golint)
    • Line 263: warning: comment on exported method ExecutionPlan.ReplaceAll should be of the form "ReplaceAll ..." (golint)
    • Line 270: warning: comment on exported method ExecutionPlan.ReplaceAllValueRef should be of the form "ReplaceAllValueRef ..." (golint)
    • Line 298: warning: comment on exported method ExecutionPlan.ReplaceAllEnv should be of the form "ReplaceAllEnv ..." (golint)
    • Line 330: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 341: warning: exported method ExecutionPlan.LinuxCommandExecutor should have comment or be unexported (golint)
    • Line 493: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 500: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 527: warning: exported method ExecutionPlan.ProbeWrapper should have comment or be unexported (golint)
    • Line 675: warning: exported method ExecutionPlan.ScanOutput should have comment or be unexported (golint)
    • Line 697: warning: exported function FindPair should have comment or be unexported (golint)
    • Line 706: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 765: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 770: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words