Preparing report...

Report for github.com/CPCTF2022/ssh-separator

(v0.5.5)

A    Great!    Found 31 issues across 36 files

Tweet

gofmt97%

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!


gocyclo94%

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.

    • service/pipe.go
    • Line 40: warning: cyclomatic complexity 18 of function (*Pipe).Pipe() is high (> 15) (gocyclo)

golint19%

Golint is a linter for Go source code.

    • domain/workspace_connection.go
    • Line 9: warning: exported type WorkspaceConnection should have comment or be unexported (golint)
    • Line 14: warning: exported function NewWorkspaceConnection should have comment or be unexported (golint)
    • Line 21: warning: exported method WorkspaceConnection.ID should have comment or be unexported (golint)
    • Line 25: warning: exported method WorkspaceConnection.WriteCloser should have comment or be unexported (golint)
    • Line 29: warning: exported method WorkspaceConnection.ReadCloser should have comment or be unexported (golint)
    • domain/values/workspace.go
    • Line 4: warning: exported type WorkspaceID should have comment or be unexported (golint)
    • Line 5: warning: exported type WorkspaceName should have comment or be unexported (golint)
    • Line 6: warning: exported type WorkspaceStatus should have comment or be unexported (golint)
    • Line 16: warning: exported function NewWorkspaceID should have comment or be unexported (golint)
    • Line 20: warning: exported function NewWorkspaceName should have comment or be unexported (golint)
    • domain/values/connection_io.go
    • Line 5: warning: exported type ConnectionIO should have comment or be unexported (golint)
    • Line 12: warning: exported function NewConnectionIO should have comment or be unexported (golint)
    • Line 21: warning: exported method ConnectionIO.Stdin should have comment or be unexported (golint)
    • Line 25: warning: exported method ConnectionIO.Stdout should have comment or be unexported (golint)
    • Line 29: warning: exported method ConnectionIO.Stderr should have comment or be unexported (golint)
    • Line 33: warning: exported method ConnectionIO.Close should have comment or be unexported (golint)
    • repository/badger/user.go
    • Line 15: warning: exported type User should have comment or be unexported (golint)
    • Line 19: warning: exported function NewUser should have comment or be unexported (golint)
    • Line 25: warning: exported method User.Create should have comment or be unexported (golint)
    • Line 52: warning: exported method User.GetPassword should have comment or be unexported (golint)
    • Line 82: warning: exported method User.GetAllUser should have comment or be unexported (golint)
    • api/user.go
    • Line 19: warning: exported type User should have comment or be unexported (golint)
    • Line 24: warning: exported function NewUser should have comment or be unexported (golint)
    • Line 37: warning: exported method User.PostNewUser should have comment or be unexported (golint)
    • Line 79: warning: exported method User.PutReset should have comment or be unexported (golint)
    • ssh/ssh.go
    • Line 21: warning: exported type SSH should have comment or be unexported (golint)
    • Line 27: warning: exported function NewSSH should have comment or be unexported (golint)
    • Line 90: warning: exported method SSH.Start should have comment or be unexported (golint)
    • domain/values/user.go
    • Line 9: warning: exported type UserName should have comment or be unexported (golint)
    • Line 10: warning: exported type Password should have comment or be unexported (golint)
    • Line 20: warning: exported function NewUserName should have comment or be unexported (golint)
    • Line 28: warning: exported function NewPassword should have comment or be unexported (golint)
    • Line 36: warning: exported function NewHashedPassword should have comment or be unexported (golint)
    • service/setup.go
    • Line 13: warning: exported type Setup should have comment or be unexported (golint)
    • Line 20: warning: exported function NewSetup should have comment or be unexported (golint)
    • Line 29: warning: exported method Setup.Setup should have comment or be unexported (golint)
    • repository/badger/db.go
    • Line 13: warning: exported type DB should have comment or be unexported (golint)
    • Line 18: warning: exported function NewDB should have comment or be unexported (golint)
    • domain/workspace.go
    • Line 10: warning: exported type Workspace should have comment or be unexported (golint)
    • Line 18: warning: exported function NewWorkspace should have comment or be unexported (golint)
    • Line 28: warning: exported method Workspace.ID should have comment or be unexported (golint)
    • Line 32: warning: exported method Workspace.Name should have comment or be unexported (golint)
    • Line 36: warning: exported method Workspace.UserName should have comment or be unexported (golint)
    • Line 40: warning: exported method Workspace.ConnectionNum should have comment or be unexported (golint)
    • Line 44: warning: exported method Workspace.AddConnection should have comment or be unexported (golint)
    • Line 50: warning: exported method Workspace.RemoveConnection should have comment or be unexported (golint)
    • repository/transaction.go
    • Line 1: warning: package comment should be of the form "Package repository ..." (golint)
    • Line 6: warning: exported type ITransaction should have comment or be unexported (golint)
    • repository/user.go
    • Line 1: warning: package comment should be of the form "Package repository ..." (golint)
    • Line 21: warning: exported type IUser should have comment or be unexported (golint)
    • store/gomap/workspace.go
    • Line 13: warning: exported type Workspace should have comment or be unexported (golint)
    • Line 17: warning: exported function NewWorkspace should have comment or be unexported (golint)
    • Line 23: warning: exported method Workspace.Set should have comment or be unexported (golint)
    • Line 29: warning: exported method Workspace.Get should have comment or be unexported (golint)
    • service/user.go
    • Line 1: warning: package comment should be of the form "Package service ..." (golint)
    • Line 18: warning: exported type IUser should have comment or be unexported (golint)
    • Line 24: warning: exported type User should have comment or be unexported (golint)
    • Line 31: warning: exported function NewUser should have comment or be unexported (golint)
    • Line 47: warning: exported method User.New should have comment or be unexported (golint)
    • Line 91: warning: exported method User.ResetContainer should have comment or be unexported (golint)
    • Line 117: warning: exported method User.Auth should have comment or be unexported (golint)
    • workspace/docker/workspace.go
    • Line 40: warning: exported type Workspace should have comment or be unexported (golint)
    • Line 42: warning: exported function NewWorkspace should have comment or be unexported (golint)
    • Line 58: warning: exported method Workspace.Create should have comment or be unexported (golint)
    • Line 93: warning: exported method Workspace.Start should have comment or be unexported (golint)
    • Line 105: warning: exported method Workspace.Stop should have comment or be unexported (golint)
    • Line 117: warning: exported method Workspace.Recreate should have comment or be unexported (golint)
    • workspace/workspace.go
    • Line 1: warning: package comment should be of the form "Package workspace ..." (golint)
    • Line 17: warning: exported type IWorkspace should have comment or be unexported (golint)
    • domain/values/window.go
    • Line 3: warning: exported type Window should have comment or be unexported (golint)
    • Line 8: warning: exported function NewWindow should have comment or be unexported (golint)
    • Line 15: warning: exported method Window.Height should have comment or be unexported (golint)
    • Line 19: warning: exported method Window.Width should have comment or be unexported (golint)
    • domain/values/workspace_connection.go
    • Line 6: warning: exported type WorkspaceConnectionID should have comment or be unexported (golint)
    • Line 9: warning: exported function NewWorkspaceConnectionID should have comment or be unexported (golint)
    • Line 13: warning: exported type WorkspaceIO should have comment or be unexported (golint)
    • Line 18: warning: exported function NewWorkspaceIO should have comment or be unexported (golint)
    • Line 25: warning: exported method WorkspaceIO.WriteCloser should have comment or be unexported (golint)
    • Line 29: warning: exported method WorkspaceIO.ReadCloser should have comment or be unexported (golint)
    • service/pipe.go
    • Line 22: warning: exported type IPipe should have comment or be unexported (golint)
    • Line 26: warning: exported type Pipe should have comment or be unexported (golint)
    • Line 32: warning: exported function NewPipe should have comment or be unexported (golint)
    • Line 40: warning: exported method Pipe.Pipe should have comment or be unexported (golint)
    • repository/badger/transaction.go
    • Line 12: warning: exported type Transaction should have comment or be unexported (golint)
    • Line 16: warning: exported function NewTransaction should have comment or be unexported (golint)
    • Line 30: warning: exported method Transaction.Transaction should have comment or be unexported (golint)
    • Line 43: warning: exported method Transaction.RTransaction should have comment or be unexported (golint)
    • api/echo.go
    • Line 18: warning: exported type API should have comment or be unexported (golint)
    • Line 22: warning: exported function NewAPI should have comment or be unexported (golint)
    • Line 28: warning: exported method API.Start should have comment or be unexported (golint)
    • domain/connection.go
    • Line 9: warning: exported type Connection should have comment or be unexported (golint)
    • Line 15: warning: exported function NewConnection should have comment or be unexported (golint)
    • Line 23: warning: exported method Connection.IsTty should have comment or be unexported (golint)
    • Line 27: warning: exported method Connection.Stdin should have comment or be unexported (golint)
    • Line 31: warning: exported method Connection.Stdout should have comment or be unexported (golint)
    • Line 35: warning: exported method Connection.Stderr should have comment or be unexported (golint)
    • Line 39: warning: exported method Connection.Close should have comment or be unexported (golint)
    • Line 43: warning: exported method Connection.WindowSender should have comment or be unexported (golint)
    • Line 47: warning: exported method Connection.WindowReceiver should have comment or be unexported (golint)
    • store/workspace.go
    • Line 1: warning: package comment should be of the form "Package store ..." (golint)
    • Line 17: warning: exported type IWorkspace should have comment or be unexported (golint)
    • workspace/docker/workspace_connection.go
    • Line 28: warning: exported type WorkspaceConnection should have comment or be unexported (golint)
    • Line 30: warning: exported function NewWorkspaceConnection should have comment or be unexported (golint)
    • Line 34: warning: exported method WorkspaceConnection.Connect should have comment or be unexported (golint)
    • Line 51: warning: exported method WorkspaceConnection.Disconnect should have comment or be unexported (golint)
    • Line 65: warning: exported method WorkspaceConnection.Resize should have comment or be unexported (golint)
    • api/validator.go
    • Line 7: warning: exported function NewValidator should have comment or be unexported (golint)
    • domain/user.go
    • Line 5: warning: exported type User should have comment or be unexported (golint)
    • Line 10: warning: exported function NewUser should have comment or be unexported (golint)
    • Line 17: warning: exported method User.GetName 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!