Preparing report...

Report for github.com/devcows/share

A    Great!    Found 17 issues across 23 files

Tweet

gofmt95%

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!


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!


golint39%

Golint is a linter for Go source code.

    • share/lib/file_server.go
    • Line 56: warning: exported function FileServerGET should have comment or be unexported (golint)
    • Line 92: warning: exported function RunFileServer should have comment or be unexported (golint)
    • share/lib/net_functions.go
    • Line 16: warning: exported function RandomFreePort should have comment or be unexported (golint)
    • Line 31: warning: exported function OpenUpnpPort should have comment or be unexported (golint)
    • Line 45: warning: exported function GetLocalIps should have comment or be unexported (golint)
    • Line 59: warning: exported function GetPublicIps should have comment or be unexported (golint)
    • Line 75: warning: exported function GetServerIps should have comment or be unexported (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • share/api/messages.go
    • Line 7: warning: exported type AddResponse should have comment or be unexported (golint)
    • Line 14: warning: exported type RmResponse should have comment or be unexported (golint)
    • Line 19: warning: exported type PsResponse should have comment or be unexported (golint)
    • share/lib/database.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: exported type Server should have comment or be unexported (golint)
    • Line 23: warning: exported function OpenDatabase should have comment or be unexported (golint)
    • Line 33: warning: exported function InitDB should have comment or be unexported (golint)
    • Line 33: warning: don't use underscores in Go names; func parameter settings_params should be settingsParams (golint)
    • Line 43: warning: exported function CreateTable should have comment or be unexported (golint)
    • Line 45: warning: don't use underscores in Go names; var sql_table should be sqlTable (golint)
    • Line 78: warning: exported function StoreServer should have comment or be unexported (golint)
    • Line 118: warning: exported function FindServer should have comment or be unexported (golint)
    • Line 122: warning: exported function RemoveServer should have comment or be unexported (golint)
    • Line 160: warning: exported function ListServers should have comment or be unexported (golint)
    • Line 190: warning: exported function SearchServerByUUID should have comment or be unexported (golint)
    • Line 206: warning: exported function SearchServerByPath should have comment or be unexported (golint)
    • share/lib/qr.go
    • Line 18: warning: exported function TempFilename should have comment or be unexported (golint)
    • Line 24: warning: exported function GenerateQR should have comment or be unexported (golint)
    • Line 53: warning: exported const BLACK should have comment or be unexported (golint)
    • Line 54: warning: exported const WHITE should have comment or be unexported (golint)
    • share/lib/settings.go
    • Line 14: warning: exported type SettingsShare should have comment or be unexported (golint)
    • Line 20: warning: exported type FileServerDaemon should have comment or be unexported (golint)
    • Line 25: warning: exported type ShareDaemon should have comment or be unexported (golint)
    • Line 33: warning: exported const DIR_MASK should have comment or be unexported (golint)
    • Line 35: warning: exported function CreateConfigFile should have comment or be unexported (golint)
    • Line 55: warning: exported function InitSettings should have comment or be unexported (golint)
    • Line 78: warning: exported function NewSettings should have comment or be unexported (golint)
    • Line 87: warning: exported function ConfigFolder should have comment or be unexported (golint)
    • Line 91: warning: exported function ConfigFile should have comment or be unexported (golint)
    • Line 95: warning: exported function CompressedFilePath should have comment or be unexported (golint)
    • Line 99: warning: exported function ConfigFileSQLITE should have comment or be unexported (golint)
    • Line 103: warning: exported function ConfigServerEndPoint should have comment or be unexported (golint)
    • Line 107: warning: exported function ConfigFileServerEndPoint should have comment or be unexported (golint)
    • Line 111: warning: exported function UserHomeDir should have comment or be unexported (golint)
    • Line 111: warning: don't use underscores in Go names; func parameter runtime_goos should be runtimeGoos (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign47%

IneffAssign detects ineffectual assignments in Go code.

    • share/lib/file_server.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/julienschmidt/httprouter (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/julienschmidt/httprouter (invalid package name: "") (ineffassign)
    • share/lib/database_test.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/satori/go.uuid (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • Line 55: warning: undeclared name: uuid (ineffassign)
    • Line 8: warning: "github.com/satori/go.uuid" imported but not used (ineffassign)
    • share/cmd/client_add.go
    • 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 12: warning: could not import github.com/atotto/clipboard (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/devcows/share/api (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/devcows/share/lib (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/atotto/clipboard (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/devcows/share/api (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/devcows/share/lib (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • share/cmd/client_ps.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/ryanuber/columnize (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/ryanuber/columnize (invalid package name: "") (ineffassign)
    • share/api/messages.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/devcows/share/lib (invalid package name: "") (ineffassign)
    • share/lib/qr.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/boombuler/barcode (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/boombuler/barcode/qr (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/boombuler/barcode (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/boombuler/barcode/qr (invalid package name: "") (ineffassign)
    • share/lib/database.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/cznic/ql/driver (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/cznic/ql/driver (invalid package name: "") (ineffassign)
    • share/lib/net_functions.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/prestonTao/upnp (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/prestonTao/upnp (invalid package name: "") (ineffassign)
    • share/cmd/server.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/satori/go.uuid (invalid package name: "") (ineffassign)
    • Line 38: warning: undeclared name: uuid (ineffassign)
    • Line 13: warning: "github.com/satori/go.uuid" imported but not used (ineffassign)
    • Line 9: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/satori/go.uuid (invalid package name: "") (ineffassign)
    • Line 38: warning: undeclared name: uuid (ineffassign)
    • Line 13: warning: "github.com/satori/go.uuid" imported but not used (ineffassign)
    • share/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/devcows/share/cmd (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!