Preparing report...

Report for github.com/rvolosatovs/systemgo

A+    Excellent!    Found 36 issues across 49 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!


gocyclo93%

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.


golint44%

Golint is a linter for Go source code.

    • systemgo/config/config.go
    • Line 14: warning: exported const DEFAULT_PORT should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: comment on exported var Target should be of the form "Target ..." (golint)
    • Line 33: warning: comment on exported var Debug should be of the form "Debug ..." (golint)
    • systemgo/unit/service/service.go
    • Line 14: warning: exported const DEFAULT_TYPE should have comment or be unexported (golint)
    • Line 44: warning: comment on exported type Unit should be of the form "Unit ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type Definition should be of the form "Definition ..." (with optional leading article) (golint)
    • Line 64: warning: exported function Supported should have comment or be unexported (golint)
    • systemgo/system/log.go
    • Line 10: warning: comment on exported const BUFFER_SIZE should be of the form "BUFFER_SIZE ..." (golint)
    • Line 50: warning: exported method Log.Len should have comment or be unexported (golint)
    • Line 54: warning: exported method Log.Cap should have comment or be unexported (golint)
    • systemgo/system/state.go
    • Line 3: warning: comment on exported type State should be of the form "State ..." (with optional leading article) (golint)
    • Line 9: warning: exported const Initializing should have comment (or a comment on this block) or be unexported (golint)
    • systemgo/unit/status.go
    • Line 5: warning: exported type Status should have comment or be unexported (golint)
    • Line 11: warning: exported type ActivationStatus should have comment or be unexported (golint)
    • Line 15: warning: exported type LoadStatus should have comment or be unexported (golint)
    • systemgo/system/unit.go
    • Line 14: warning: exported var ErrIsStarting should have comment or be unexported (golint)
    • Line 16: warning: exported type Unit should have comment or be unexported (golint)
    • Line 68: warning: exported method Unit.IsDead should have comment or be unexported (golint)
    • Line 71: warning: exported method Unit.IsActive should have comment or be unexported (golint)
    • Line 74: warning: exported method Unit.IsActivating should have comment or be unexported (golint)
    • Line 77: warning: exported method Unit.IsDeactivating should have comment or be unexported (golint)
    • Line 80: warning: exported method Unit.IsReloading should have comment or be unexported (golint)
    • Line 84: warning: exported method Unit.IsLoaded should have comment or be unexported (golint)
    • Line 94: warning: exported method Unit.Active should have comment or be unexported (golint)
    • Line 109: warning: exported method Unit.Sub should have comment or be unexported (golint)
    • systemgo/unit/errors.go
    • Line 8: warning: exported var ErrNotSet should have comment or be unexported (golint)
    • Line 9: warning: exported var ErrNotExist should have comment or be unexported (golint)
    • Line 10: warning: exported var ErrNotSupported should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrUnknownType should have comment or be unexported (golint)
    • Line 12: warning: exported var ErrPathNotAbs should have comment or be unexported (golint)
    • Line 13: warning: exported var ErrNotParsed should have comment or be unexported (golint)
    • Line 14: warning: exported var ErrWrongVal should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrNotStarted should have comment or be unexported (golint)
    • Line 17: warning: exported type ParseError should have comment or be unexported (golint)
    • Line 22: warning: exported function ParseErr should have comment or be unexported (golint)
    • Line 33: warning: exported type MultiError should have comment or be unexported (golint)
    • Line 35: warning: exported method MultiError.Errors should have comment or be unexported (golint)
    • systemgo/unit/interfaces.go
    • Line 5: warning: exported type Interface should have comment or be unexported (golint)
    • Line 15: warning: exported type Definer should have comment or be unexported (golint)
    • Line 46: warning: exported type Dependency should have comment or be unexported (golint)
    • systemgo/system/errors.go
    • Line 5: warning: exported var ErrIsDir should have comment or be unexported (golint)
    • Line 6: warning: exported var ErrNotDir should have comment or be unexported (golint)
    • Line 7: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 8: warning: exported var ErrDepFail should have comment or be unexported (golint)
    • Line 9: warning: exported var ErrDepConflict should have comment or be unexported (golint)
    • Line 10: warning: exported var ErrNotLoaded should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrNoReload should have comment or be unexported (golint)
    • Line 12: warning: exported var ErrUnknownType should have comment or be unexported (golint)
    • Line 13: warning: exported var ErrNotActive should have comment or be unexported (golint)
    • Line 14: warning: exported var ErrExists should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrNotImplemented should have comment or be unexported (golint)
    • Line 16: warning: exported var ErrUnmergeable should have comment or be unexported (golint)
    • systemgo/systemctl/rpc.go
    • Line 10: warning: exported type Response should have comment or be unexported (golint)
    • Line 24: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 28: warning: exported type Server should have comment or be unexported (golint)
    • Line 32: warning: exported method Server.Start should have comment or be unexported (golint)
    • Line 36: warning: exported method Server.Stop should have comment or be unexported (golint)
    • Line 40: warning: exported method Server.Restart should have comment or be unexported (golint)
    • Line 44: warning: exported method Server.Isolate should have comment or be unexported (golint)
    • Line 48: warning: exported method Server.Reload should have comment or be unexported (golint)
    • Line 52: warning: exported method Server.Enable should have comment or be unexported (golint)
    • Line 56: warning: exported method Server.Disable should have comment or be unexported (golint)
    • Line 60: warning: exported method Server.Status should have comment or be unexported (golint)
    • Line 78: warning: exported method Server.StatusAll should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign67%

IneffAssign detects ineffectual assignments in Go code.

    • systemgo/unit/definition_test.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/rvolosatovs/systemgo/unit (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • systemgo/system/transaction.go
    • Line 110: warning: u.Conflicts undefined (type *Unit has no field or method Conflicts) (ineffassign)
    • Line 284: warning: u.After undefined (type *Unit has no field or method After) (ineffassign)
    • Line 298: warning: u.Before undefined (type *Unit has no field or method Before) (ineffassign)
    • Line 110: warning: u.Conflicts undefined (type *Unit has no field or method Conflicts) (ineffassign)
    • Line 284: warning: u.After undefined (type *Unit has no field or method After) (ineffassign)
    • Line 298: warning: u.Before undefined (type *Unit has no field or method Before) (ineffassign)
    • systemgo/system/job.go
    • Line 126: warning: j.unit.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • Line 126: warning: j.unit.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • systemgo/system/log.go
    • Line 43: warning: l.Hooks undefined (type *Log has no field or method Hooks) (ineffassign)
    • Line 43: warning: l.Hooks undefined (type *Log has no field or method Hooks) (ineffassign)
    • systemgo/config/config.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/rvolosatovs/systemgo/system (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/spf13/viper (invalid package name: "") (ineffassign)
    • systemgo/unit/service/service.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/rvolosatovs/systemgo/unit (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/rvolosatovs/systemgo/unit (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • systemgo/system/daemon.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/rvolosatovs/systemgo/unit (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/rvolosatovs/systemgo/unit/service (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 371: warning: u.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • Line 378: warning: u.Log.Error undefined (type *Log has no field or method Error) (ineffassign)
    • Line 380: warning: u.Log.Error undefined (type *Log has no field or method Error) (ineffassign)
    • Line 383: warning: u.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • Line 10: warning: could not import github.com/rvolosatovs/systemgo/unit (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/rvolosatovs/systemgo/unit/service (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 371: warning: u.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • Line 378: warning: u.Log.Error undefined (type *Log has no field or method Error) (ineffassign)
    • Line 380: warning: u.Log.Error undefined (type *Log has no field or method Error) (ineffassign)
    • Line 383: warning: u.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • systemgo/systemctl/interfaces.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/rvolosatovs/systemgo/system (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/rvolosatovs/systemgo/unit (invalid package name: "") (ineffassign)
    • systemgo/system/daemon_test.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import github.com/golang/mock/gomock (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/rvolosatovs/systemgo/test/mock_unit (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/stretchr/testify/assert (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/stretchr/testify/require (invalid package name: "") (ineffassign)
    • systemgo/systemctl/cli/list-units.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 31: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/rvolosatovs/systemgo/systemctl (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import github.com/rvolosatovs/systemgo/unit (invalid package name: "") (ineffassign)
    • Line 31: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • Line 30: warning: "github.com/rvolosatovs/systemgo/unit" imported but not used (ineffassign)
    • systemgo/system/unit.go
    • Line 144: warning: u.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • Line 195: warning: u.RequiredBy undefined (type *Unit has no field or method RequiredBy) (ineffassign)
    • Line 206: warning: u.WantedBy undefined (type *Unit has no field or method WantedBy) (ineffassign)
    • Line 233: warning: u.RequiredBy undefined (type *Unit has no field or method RequiredBy) (ineffassign)
    • Line 244: warning: u.WantedBy undefined (type *Unit has no field or method WantedBy) (ineffassign)
    • Line 309: warning: u.Log.Println undefined (type *Log has no field or method Println) (ineffassign)
    • Line 339: warning: u.Log.Println undefined (type *Log has no field or method Println) (ineffassign)
    • Line 144: warning: u.Log.Errorf undefined (type *Log has no field or method Errorf) (ineffassign)
    • Line 195: warning: u.RequiredBy undefined (type *Unit has no field or method RequiredBy) (ineffassign)
    • Line 206: warning: u.WantedBy undefined (type *Unit has no field or method WantedBy) (ineffassign)
    • Line 233: warning: u.RequiredBy undefined (type *Unit has no field or method RequiredBy) (ineffassign)
    • Line 244: warning: u.WantedBy undefined (type *Unit has no field or method WantedBy) (ineffassign)
    • Line 309: warning: u.Log.Println undefined (type *Log has no field or method Println) (ineffassign)
    • Line 339: warning: u.Log.Println undefined (type *Log has no field or method Println) (ineffassign)
    • systemgo/cmd/init/main.go
    • Line 13: 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 13: warning: could not import github.com/Sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/rvolosatovs/systemgo/config (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/rvolosatovs/systemgo/system (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import github.com/rvolosatovs/systemgo/systemctl (invalid package name: "") (ineffassign)

misspell95%

Misspell Finds commonly misspelled English words