Preparing report...

Report for github.com/joaosoft/monitor

B    Not bad!    Found 11 issues across 12 files

Tweet

gofmt66%

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!


golint25%

Golint is a linter for Go source code.

    • monitor/routes.go
    • Line 8: warning: exported method Controller.RegisterRoutes should have comment or be unexported (golint)
    • monitor/storage.go
    • Line 13: warning: exported type StoragePostgres should have comment or be unexported (golint)
    • Line 18: warning: exported method Monitor.NewStoragePostgres should have comment or be unexported (golint)
    • Line 25: warning: exported method StoragePostgres.GetProcess should have comment or be unexported (golint)
    • Line 69: warning: exported method StoragePostgres.GetProcesses should have comment or be unexported (golint)
    • Line 141: warning: exported method StoragePostgres.CreateProcess should have comment or be unexported (golint)
    • Line 175: warning: exported method StoragePostgres.UpdateProcess should have comment or be unexported (golint)
    • Line 208: warning: exported method StoragePostgres.UpdateProcessStatus should have comment or be unexported (golint)
    • Line 220: warning: exported method StoragePostgres.DeleteProcess should have comment or be unexported (golint)
    • Line 232: warning: exported method StoragePostgres.DeleteProcesses should have comment or be unexported (golint)
    • monitor/consts.go
    • Line 4: warning: exported const DefaultURL should have comment (or a comment on this block) or be unexported (golint)
    • monitor/parse.go
    • Line 9: warning: exported method Status.Scan should have comment or be unexported (golint)
    • Line 26: warning: exported method Status.Value should have comment or be unexported (golint)
    • monitor/structs.go
    • Line 10: warning: exported type Status should have comment or be unexported (golint)
    • Line 12: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • Line 18: warning: exported type GetProcessRequest should have comment or be unexported (golint)
    • Line 22: warning: exported type CreateProcessRequest should have comment or be unexported (golint)
    • Line 38: warning: exported type UpdateProcessRequest should have comment or be unexported (golint)
    • Line 55: warning: exported type UpdateProcessStatusRequest should have comment or be unexported (golint)
    • Line 60: warning: exported type DeleteProcessRequest should have comment or be unexported (golint)
    • Line 64: warning: exported type Process should have comment or be unexported (golint)
    • Line 80: warning: exported type ListProcess should have comment or be unexported (golint)
    • monitor/utils.go
    • Line 14: warning: exported function GetEnv should have comment or be unexported (golint)
    • Line 23: warning: exported function Exists should have comment or be unexported (golint)
    • Line 32: warning: exported function ReadFile should have comment or be unexported (golint)
    • Line 58: warning: exported function ReadFileLines should have comment or be unexported (golint)
    • Line 83: warning: exported function WriteFile should have comment or be unexported (golint)
    • Line 96: warning: exported function EncodeString should have comment or be unexported (golint)
    • monitor/controller.go
    • Line 10: warning: exported type Controller should have comment or be unexported (golint)
    • Line 15: warning: exported method Monitor.NewController should have comment or be unexported (golint)
    • Line 22: warning: exported method Controller.DoNothing should have comment or be unexported (golint)
    • Line 26: warning: exported method Controller.GetProcessHandler should have comment or be unexported (golint)
    • Line 44: warning: exported method Controller.GetProcessesHandler should have comment or be unexported (golint)
    • Line 54: warning: exported method Controller.CreateProcessHandler should have comment or be unexported (golint)
    • Line 86: 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 91: warning: exported method Controller.UpdateProcessHandler should have comment or be unexported (golint)
    • Line 123: 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 128: warning: exported method Controller.UpdateProcessStatusHandler should have comment or be unexported (golint)
    • Line 143: 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 148: warning: exported method Controller.UpdateProcessStatusCheckHandler should have comment or be unexported (golint)
    • Line 163: 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 168: warning: exported method Controller.DeleteProcessHandler should have comment or be unexported (golint)
    • Line 185: 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 190: warning: exported method Controller.DeleteProcessesHandler should have comment or be unexported (golint)
    • Line 193: 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)
    • monitor/interactor.go
    • Line 13: warning: exported type IStorageDB should have comment or be unexported (golint)
    • Line 23: warning: exported type Interactor should have comment or be unexported (golint)
    • Line 28: warning: exported method Monitor.NewInteractor should have comment or be unexported (golint)
    • Line 35: warning: exported method Interactor.GetProcesses should have comment or be unexported (golint)
    • Line 42: 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 47: warning: exported method Interactor.GetProcess should have comment or be unexported (golint)
    • Line 54: 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 59: warning: exported method Interactor.CreateProcess should have comment or be unexported (golint)
    • Line 67: 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 72: warning: exported method Interactor.UpdateProcess should have comment or be unexported (golint)
    • Line 79: 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 84: warning: exported method Interactor.UpdateProcessStatus should have comment or be unexported (golint)
    • Line 94: 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 102: warning: exported method Interactor.UpdateProcessStatusCheck should have comment or be unexported (golint)
    • Line 108: 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 113: warning: exported method Interactor.DeleteProcess should have comment or be unexported (golint)
    • Line 124: warning: exported method Interactor.DeleteProcesses should have comment or be unexported (golint)
    • Line 135: warning: exported method Interactor.CanExecute should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign58%

IneffAssign detects ineffectual assignments in Go code.

    • monitor/cmd/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import monitor (invalid package name: "") (ineffassign)
    • monitor/controller.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/joaosoft/errors (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/joaosoft/logger (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/joaosoft/validator (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/joaosoft/web (invalid package name: "") (ineffassign)
    • monitor/config.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/joaosoft/manager (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/joaosoft/migration/services (invalid package name: "") (ineffassign)
    • monitor/interactor.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/joaosoft/types (invalid package name: "") (ineffassign)
    • monitor/monitor.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/labstack/gommon/log (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!