Preparing report...

Report for github.com/CovenantSQL/pgweb

A    Great!    Found 21 issues across 28 files

Tweet

gofmt96%

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!


gocyclo92%

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.


golint50%

Golint is a linter for Go source code.

    • pgweb/pkg/command/options.go
    • Line 11: warning: exported type Options should have comment or be unexported (golint)
    • Line 36: warning: exported var Opts should have comment or be unexported (golint)
    • Line 38: warning: exported function ParseOptions should have comment or be unexported (golint)
    • pgweb/pkg/command/version.go
    • Line 4: warning: exported const Version should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: exported var GitCommit should have comment or be unexported (golint)
    • pgweb/pkg/api/routes.go
    • Line 8: warning: exported function SetupMiddlewares should have comment or be unexported (golint)
    • Line 20: warning: exported function SetupRoutes should have comment or be unexported (golint)
    • pgweb/pkg/client/client.go
    • Line 18: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: exported type Client should have comment or be unexported (golint)
    • Line 30: warning: comment on exported type RowsOptions should be of the form "RowsOptions ..." (with optional leading article) (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • Line 64: warning: exported function NewFromUrl should have comment or be unexported (golint)
    • Line 90: warning: exported method Client.Test should have comment or be unexported (golint)
    • Line 94: warning: exported method Client.Info should have comment or be unexported (golint)
    • Line 98: warning: exported method Client.Databases should have comment or be unexported (golint)
    • Line 102: warning: exported method Client.Schemas should have comment or be unexported (golint)
    • Line 106: warning: exported method Client.Objects should have comment or be unexported (golint)
    • Line 110: warning: exported method Client.Table should have comment or be unexported (golint)
    • Line 138: warning: exported method Client.MaterializedView should have comment or be unexported (golint)
    • Line 143: warning: exported method Client.TableRows should have comment or be unexported (golint)
    • Line 169: warning: exported method Client.TableRowsCount should have comment or be unexported (golint)
    • Line 179: warning: exported method Client.TableInfo should have comment or be unexported (golint)
    • Line 183: warning: exported method Client.TableIndexes should have comment or be unexported (golint)
    • Line 193: warning: exported method Client.TableConstraints should have comment or be unexported (golint)
    • Line 198: warning: comment on exported method Client.Activity should be of the form "Activity ..." (golint)
    • Line 204: warning: exported method Client.Query should have comment or be unexported (golint)
    • Line 215: warning: exported method Client.ServerVersion should have comment or be unexported (golint)
    • Line 311: warning: exported method Client.IsIdle should have comment or be unexported (golint)
    • pgweb/pkg/bookmarks/bookmarks.go
    • Line 15: warning: exported type Bookmark should have comment or be unexported (golint)
    • Line 26: warning: exported method Bookmark.SSHInfoIsEmpty should have comment or be unexported (golint)
    • Line 30: warning: exported method Bookmark.ConvertToOptions should have comment or be unexported (golint)
    • Line 80: warning: exported function Path should have comment or be unexported (golint)
    • Line 89: warning: exported function ReadAll should have comment or be unexported (golint)
    • Line 117: warning: exported function GetBookmark should have comment or be unexported (golint)
    • pgweb/pkg/api/helpers.go
    • Line 44: warning: exported type Error should have comment or be unexported (golint)
    • Line 48: warning: exported function NewError should have comment or be unexported (golint)
    • pgweb/pkg/util/profiler.go
    • Line 10: warning: exported const MEGABYTE should have comment or be unexported (golint)
    • Line 30: warning: exported function StartProfiler should have comment or be unexported (golint)
    • pgweb/pkg/client/result.go
    • Line 16: warning: exported type Row should have comment or be unexported (golint)
    • Line 18: warning: exported type Pagination should have comment or be unexported (golint)
    • Line 25: warning: exported type Result should have comment or be unexported (golint)
    • Line 31: warning: exported type Objects should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method Result.PrepareBigints should be of the form "PrepareBigints ..." (golint)
    • Line 71: warning: exported method Result.Format should have comment or be unexported (golint)
    • Line 87: warning: exported method Result.CSV should have comment or be unexported (golint)
    • Line 121: warning: exported method Result.JSON should have comment or be unexported (golint)
    • Line 133: warning: exported function ObjectsFromResult should have comment or be unexported (golint)
    • Line 139: warning: don't use underscores in Go names; var object_type should be objectType (golint)
    • pgweb/pkg/history/history.go
    • Line 7: warning: exported type Record should have comment or be unexported (golint)
    • Line 12: warning: exported function New should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRecord should have comment or be unexported (golint)
    • pgweb/pkg/api/api.go
    • Line 32: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 57: warning: exported function GetHome should have comment or be unexported (golint)
    • Line 61: warning: exported function GetAsset should have comment or be unexported (golint)
    • Line 65: warning: exported function GetSessions should have comment or be unexported (golint)
    • Line 75: warning: exported function ConnectWithBackend should have comment or be unexported (golint)
    • Line 120: warning: exported function Connect should have comment or be unexported (golint)
    • Line 171: warning: exported function SwitchDb should have comment or be unexported (golint)
    • Line 233: warning: exported function Disconnect should have comment or be unexported (golint)
    • Line 255: warning: exported function GetDatabases should have comment or be unexported (golint)
    • Line 266: warning: exported function GetObjects should have comment or be unexported (golint)
    • Line 275: warning: exported function RunQuery should have comment or be unexported (golint)
    • Line 286: warning: exported function ExplainQuery should have comment or be unexported (golint)
    • Line 297: warning: exported function GetSchemas should have comment or be unexported (golint)
    • Line 302: warning: exported function GetTable should have comment or be unexported (golint)
    • Line 315: warning: exported function GetTableRows should have comment or be unexported (golint)
    • Line 367: warning: exported function GetTableInfo should have comment or be unexported (golint)
    • Line 376: warning: exported function GetHistory should have comment or be unexported (golint)
    • Line 380: warning: exported function GetConnectionInfo should have comment or be unexported (golint)
    • Line 394: warning: exported function GetActivity should have comment or be unexported (golint)
    • Line 399: warning: exported function GetTableIndexes should have comment or be unexported (golint)
    • Line 404: warning: exported function GetTableConstraints should have comment or be unexported (golint)
    • Line 409: warning: exported function HandleQuery should have comment or be unexported (golint)
    • Line 444: warning: exported function GetBookmarks should have comment or be unexported (golint)
    • Line 449: warning: exported function GetInfo should have comment or be unexported (golint)
    • Line 457: warning: comment on exported function DataExport should be of the form "DataExport ..." (golint)
    • pgweb/pkg/client/dump.go
    • Line 10: warning: exported type Dump should have comment or be unexported (golint)
    • Line 14: warning: exported method Dump.CanExport should have comment or be unexported (golint)
    • Line 19: warning: exported method Dump.Export should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign53%

IneffAssign detects ineffectual assignments in Go code.

    • pgweb/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/CovenantSQL/pgweb/pkg/cli (invalid package name: "") (ineffassign)
    • pgweb/pkg/command/options.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/jessevdk/go-flags (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/jessevdk/go-flags (invalid package name: "") (ineffassign)
    • pgweb/pkg/bookmarks/bookmarks.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/shared (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/mitchellh/go-homedir (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/shared (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/mitchellh/go-homedir (invalid package name: "") (ineffassign)
    • pgweb/pkg/connection/connection_string_test.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • Line 12: warning: undeclared name: BuildStringFromOptions (ineffassign)
    • Line 19: warning: undeclared name: BuildStringFromOptions (ineffassign)
    • Line 28: warning: undeclared name: BuildStringFromOptions (ineffassign)
    • Line 37: warning: undeclared name: IsBlank (ineffassign)
    • Line 38: warning: undeclared name: IsBlank (ineffassign)
    • Line 39: warning: undeclared name: IsBlank (ineffassign)
    • pgweb/pkg/api/api.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/bookmarks (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/CovenantSQL/pgweb/pkg/client (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/CovenantSQL/pgweb/pkg/connection (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/CovenantSQL/pgweb/pkg/shared (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import github.com/tuvistavie/securerandom (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/bookmarks (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/CovenantSQL/pgweb/pkg/client (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/CovenantSQL/pgweb/pkg/connection (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/CovenantSQL/pgweb/pkg/shared (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import github.com/tuvistavie/securerandom (invalid package name: "") (ineffassign)
    • pgweb/pkg/api/helpers.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/data (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/data (invalid package name: "") (ineffassign)
    • pgweb/pkg/cli/cli.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/CovenantSQL/pgweb/pkg/api (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/bookmarks (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/CovenantSQL/pgweb/pkg/client (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/CovenantSQL/pgweb/pkg/connection (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/CovenantSQL/pgweb/pkg/shared (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/CovenantSQL/pgweb/pkg/util (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/jessevdk/go-flags (invalid package name: "") (ineffassign)
    • Line 18: warning: "github.com/jessevdk/go-flags" imported but not used as flags (ineffassign)
    • pgweb/pkg/client/client.go
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/connection (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/CovenantSQL/pgweb/pkg/history (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/CovenantSQL/pgweb/pkg/shared (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/CovenantSQL/pgweb/pkg/statements (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/jmoiron/sqlx (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/CovenantSQL/CovenantSQL/client (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/CovenantSQL/pgweb/pkg/command (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/CovenantSQL/pgweb/pkg/connection (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/CovenantSQL/pgweb/pkg/history (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/CovenantSQL/pgweb/pkg/shared (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/CovenantSQL/pgweb/pkg/statements (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/jmoiron/sqlx (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/CovenantSQL/CovenantSQL/client (invalid package name: "") (ineffassign)
    • pgweb/pkg/client/tunnel.go
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: could not import golang.org/x/crypto/ssh (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import golang.org/x/crypto/ssh (invalid package name: "") (ineffassign)
    • pgweb/pkg/api/api_test.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!