Preparing report...

Report for github.com/assetto-corsa-web/accweb

(v1.15.1)

A    Great!    Found 11 issues across 13 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!


gocyclo100%

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.

No problems detected. Good job!


golint15%

Golint is a linter for Go source code.

    • internal/pkg/instance/instance.go
    • Line 32: warning: exported var ErrServerCantBeRunning should have comment or be unexported (golint)
    • Line 36: warning: exported type Instance should have comment or be unexported (golint)
    • Line 45: warning: exported method Instance.GetID should have comment or be unexported (golint)
    • Line 49: warning: exported method Instance.Start should have comment or be unexported (golint)
    • Line 117: warning: exported method Instance.Stop should have comment or be unexported (golint)
    • Line 132: warning: exported method Instance.GetProcessID should have comment or be unexported (golint)
    • Line 140: warning: exported method Instance.Save should have comment or be unexported (golint)
    • Line 165: warning: exported method Instance.CheckDirectory should have comment or be unexported (golint)
    • Line 188: warning: exported method Instance.CheckServerExeMd5Sum should have comment or be unexported (golint)
    • Line 205: warning: exported method Instance.UpdateAccServerExe should have comment or be unexported (golint)
    • Line 227: warning: exported method Instance.IsRunning should have comment or be unexported (golint)
    • Line 231: warning: exported method Instance.GetAccServerLogs should have comment or be unexported (golint)
    • Line 240: warning: exported method Instance.ExportConfigFilesToZip should have comment or be unexported (golint)
    • internal/pkg/cfg/cfg.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 20: warning: exported type Webserver should have comment or be unexported (golint)
    • Line 27: warning: exported type CORS should have comment or be unexported (golint)
    • Line 32: warning: exported type Auth should have comment or be unexported (golint)
    • Line 40: warning: exported type ACC should have comment or be unexported (golint)
    • internal/pkg/helper/file.go
    • Line 26: warning: exported function Encode should have comment or be unexported (golint)
    • Line 35: warning: exported function Decode should have comment or be unexported (golint)
    • Line 52: warning: exported function LoadFromPath should have comment or be unexported (golint)
    • Line 69: warning: exported function SaveToPath should have comment or be unexported (golint)
    • Line 83: warning: exported function CheckMd5Sum should have comment or be unexported (golint)
    • Line 101: warning: exported function Exists should have comment or be unexported (golint)
    • Line 109: warning: exported function Copy should have comment or be unexported (golint)
    • Line 145: warning: exported function CopyDirectory should have comment or be unexported (golint)
    • internal/app/handler_instances.go
    • Line 13: warning: exported type InstancePayload should have comment or be unexported (golint)
    • Line 22: warning: exported type SaveInstancePayload should have comment or be unexported (golint)
    • Line 27: warning: exported function NewInstancePayload should have comment or be unexported (golint)
    • Line 38: warning: exported method Handler.GetInstance should have comment or be unexported (golint)
    • Line 56: warning: exported method Handler.NewInstance should have comment or be unexported (golint)
    • Line 74: warning: exported method Handler.SaveInstance should have comment or be unexported (golint)
    • Line 114: warning: exported method Handler.DeleteInstance should have comment or be unexported (golint)
    • Line 130: warning: exported method Handler.StartInstance should have comment or be unexported (golint)
    • Line 151: warning: exported method Handler.StopInstance should have comment or be unexported (golint)
    • Line 168: warning: exported method Handler.CloneInstance should have comment or be unexported (golint)
    • Line 187: warning: exported method Handler.GetInstanceLogs should have comment or be unexported (golint)
    • Line 205: warning: exported method Handler.ExportInstance should have comment or be unexported (golint)
    • internal/app/handler_servers.go
    • Line 10: warning: exported type ListServerItem should have comment or be unexported (golint)
    • Line 20: warning: exported method Handler.ListServers should have comment or be unexported (golint)
    • Line 38: warning: exported method Handler.StopAllServers should have comment or be unexported (golint)
    • internal/pkg/instance/config.go
    • Line 17: warning: exported type AccConfigFiles should have comment or be unexported (golint)
    • Line 27: warning: exported type AccWebConfigJson should have comment or be unexported (golint)
    • Line 35: warning: exported method AccWebConfigJson.SetUpdateAt should have comment or be unexported (golint)
    • Line 39: warning: exported type ConfigurationJson should have comment or be unexported (golint)
    • Line 48: warning: exported type SettingsJson should have comment or be unexported (golint)
    • Line 70: warning: exported type EventJson should have comment or be unexported (golint)
    • Line 87: warning: exported type EventRulesJson should have comment or be unexported (golint)
    • Line 103: warning: exported type SessionSettings should have comment or be unexported (golint)
    • Line 111: warning: exported type EntrylistJson should have comment or be unexported (golint)
    • Line 117: warning: exported type EntrySettings should have comment or be unexported (golint)
    • Line 130: warning: exported type DriverSettings should have comment or be unexported (golint)
    • Line 138: warning: exported type BopJson should have comment or be unexported (golint)
    • Line 143: warning: exported type BopSettings should have comment or be unexported (golint)
    • Line 150: warning: exported type AssistRulesJson should have comment or be unexported (golint)
    • internal/pkg/server_manager/service.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 19: warning: exported var ErrCantCreateConfigDir should have comment or be unexported (golint)
    • Line 24: warning: exported type Config should have comment or be unexported (golint)
    • Line 31: warning: exported type Service should have comment or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • Line 75: warning: exported method Service.AutoStart should have comment or be unexported (golint)
    • Line 89: warning: exported method Service.StopAll should have comment or be unexported (golint)
    • Line 105: warning: exported method Service.GetAccServerExeMd5Sum should have comment or be unexported (golint)
    • Line 118: warning: exported method Service.UpdateServersServerExeFile should have comment or be unexported (golint)
    • Line 138: warning: exported method Service.Bootstrap should have comment or be unexported (golint)
    • Line 186: warning: exported method Service.GetServers should have comment or be unexported (golint)
    • Line 190: warning: exported method Service.GetServerByID should have comment or be unexported (golint)
    • Line 197: warning: exported method Service.Create should have comment or be unexported (golint)
    • Line 231: warning: exported method Service.Delete should have comment or be unexported (golint)
    • Line 252: warning: exported method Service.Duplicate should have comment or be unexported (golint)
    • internal/app/server.go
    • Line 19: warning: exported type Handler should have comment or be unexported (golint)
    • Line 39: warning: exported function StartServer should have comment or be unexported (golint)
    • Line 110: warning: exported type LoginPayload should have comment or be unexported (golint)
    • Line 114: warning: exported type User should have comment or be unexported (golint)
    • Line 231: warning: exported function GetUserFromClaims should have comment or be unexported (golint)
    • Line 234: 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)
    • internal/pkg/instance/loader.go
    • Line 18: 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 61: warning: exported function SetConfigVersion should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!