Preparing report...

Report for github.com/Oppodelldog/toggleperfect

A+    Excellent!    Found 43 issues across 54 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo98%

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.


golint20%

Golint is a linter for Go source code.

    • toggleperfect/internal/led/led.go
    • Line 9: warning: exported type State should have comment or be unexported (golint)
    • Line 16: warning: exported type Pins should have comment or be unexported (golint)
    • Line 23: warning: exported type UpdateChannel should have comment or be unexported (golint)
    • Line 25: warning: exported function NewLEDChannel should have comment or be unexported (golint)
    • Line 29: warning: exported function RunLEDWorker should have comment or be unexported (golint)
    • toggleperfect/internal/apps/apps.go
    • Line 11: warning: exported function New should have comment or be unexported (golint)
    • Line 26: warning: exported type App should have comment or be unexported (golint)
    • Line 34: warning: exported type Apps should have comment or be unexported (golint)
    • Line 39: warning: exported method Apps.Dispose should have comment or be unexported (golint)
    • Line 48: warning: exported method Apps.HandleEvent should have comment or be unexported (golint)
    • toggleperfect/internal/apps/plugins.go
    • Line 16: warning: exported function LoadAppFromFile should have comment or be unexported (golint)
    • Line 32: 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)
    • toggleperfect/internal/log/log.go
    • Line 12: warning: exported function Init should have comment or be unexported (golint)
    • Line 29: warning: exported function AddReceiver should have comment or be unexported (golint)
    • Line 39: warning: exported function Print should have comment or be unexported (golint)
    • Line 46: warning: exported function Printf should have comment or be unexported (golint)
    • Line 53: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 60: warning: exported function Fatal should have comment or be unexported (golint)
    • toggleperfect/internal/keys/keys.go
    • Line 20: warning: exported const Key1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: comment on exported type State should be of the form "State ..." (with optional leading article) (golint)
    • Line 39: warning: exported const Down should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported type Pins should have comment or be unexported (golint)
    • Line 59: warning: comment on exported function NewEventChannel should be of the form "NewEventChannel ..." (golint)
    • toggleperfect/internal/apps/timetoggle/app/repo/project.go
    • Line 10: warning: exported type Project should have comment or be unexported (golint)
    • Line 16: warning: exported function SaveProject should have comment or be unexported (golint)
    • Line 20: warning: exported function GetProject should have comment or be unexported (golint)
    • Line 24: warning: exported function DeleteProject should have comment or be unexported (golint)
    • Line 28: warning: exported function GetProjectList should have comment or be unexported (golint)
    • toggleperfect/internal/apps/dev.go
    • Line 15: warning: exported function NewDevLedUpdateChannel should have comment or be unexported (golint)
    • Line 32: warning: exported function NewDevDisplayChannel should have comment or be unexported (golint)
    • toggleperfect/internal/apps/timetoggle/app/captureticker.go
    • Line 12: warning: exported function NewCaptureTicker should have comment or be unexported (golint)
    • Line 22: warning: exported type CaptureTicker should have comment or be unexported (golint)
    • Line 28: warning: exported method CaptureTicker.Start should have comment or be unexported (golint)
    • Line 50: warning: exported method CaptureTicker.Stop should have comment or be unexported (golint)
    • toggleperfect/internal/apps/timetoggle/apidocs/apidocs.go
    • Line 29: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 68: warning: exported type StatWrap should have comment or be unexported (golint)
    • Line 73: warning: exported method StatWrap.Name should have comment or be unexported (golint)
    • Line 77: warning: exported method StatWrap.Size should have comment or be unexported (golint)
    • Line 81: warning: exported method StatWrap.Mode should have comment or be unexported (golint)
    • Line 85: warning: exported method StatWrap.ModTime should have comment or be unexported (golint)
    • Line 89: warning: exported method StatWrap.IsDir should have comment or be unexported (golint)
    • Line 93: warning: exported method StatWrap.Sys should have comment or be unexported (golint)
    • Line 97: warning: exported type ContentReplacedHttpFile should have comment or be unexported (golint)
    • Line 104: warning: exported method ContentReplacedHttpFile.Close should have comment or be unexported (golint)
    • Line 112: warning: exported method ContentReplacedHttpFile.Seek should have comment or be unexported (golint)
    • Line 116: warning: exported method ContentReplacedHttpFile.Readdir should have comment or be unexported (golint)
    • Line 120: warning: exported method ContentReplacedHttpFile.Stat should have comment or be unexported (golint)
    • toggleperfect/internal/apps/timetoggle/app/app.go
    • Line 15: warning: exported type TimeToggle should have comment or be unexported (golint)
    • Line 28: warning: exported method TimeToggle.Init should have comment or be unexported (golint)
    • Line 36: warning: exported method TimeToggle.Dispose should have comment or be unexported (golint)
    • Line 40: warning: exported method TimeToggle.Activate should have comment or be unexported (golint)
    • Line 53: warning: exported method TimeToggle.Deactivate should have comment or be unexported (golint)
    • Line 57: warning: exported method TimeToggle.HandleEvent should have comment or be unexported (golint)
    • Line 231: warning: exported function GetProjectsOverview should have comment or be unexported (golint)
    • toggleperfect/internal/ui/lists.go
    • Line 8: warning: exported type LedPins should have comment or be unexported (golint)
    • Line 10: warning: exported method LedPins.High should have comment or be unexported (golint)
    • Line 16: warning: exported method LedPins.Low should have comment or be unexported (golint)
    • Line 22: warning: exported type KeyPins should have comment or be unexported (golint)
    • Line 24: warning: exported method KeyPins.IsKeyPressed should have comment or be unexported (golint)
    • toggleperfect/internal/display/display.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: exported const EpdWidth should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type UpdateChannel should have comment or be unexported (golint)
    • Line 28: warning: exported function NewDisplayChannel should have comment or be unexported (golint)
    • Line 71: warning: comment on exported function NewDisplay should be of the form "NewDisplay ..." (golint)
    • Line 151: warning: exported type Display should have comment or be unexported (golint)
    • Line 159: warning: exported method Display.DisplayImage should have comment or be unexported (golint)
    • Line 292: warning: exported method Display.Close should have comment or be unexported (golint)
    • toggleperfect/internal/remote/websocket.go
    • Line 20: warning: exported type Message should have comment or be unexported (golint)
    • Line 43: warning: exported function NewWebsocketEndpoint should have comment or be unexported (golint)
    • Line 98: warning: exported type MessageBuffer should have comment or be unexported (golint)
    • toggleperfect/internal/ui/control.go
    • Line 11: warning: context.Context should be the first parameter of a function (golint)
    • Line 11: warning: exported function New should have comment or be unexported (golint)
    • Line 19: warning: exported type UI should have comment or be unexported (golint)
    • toggleperfect/internal/apps/timetoggle/app/repo/capture.go
    • Line 13: warning: exported type Capture should have comment or be unexported (golint)
    • Line 18: warning: exported type CaptureFile should have comment or be unexported (golint)
    • Line 24: warning: exported function GetAllCaptures should have comment or be unexported (golint)
    • Line 71: warning: exported function SetLatestStop should have comment or be unexported (golint)
    • Line 84: warning: exported function AddStart should have comment or be unexported (golint)
    • Line 93: warning: exported function AddStop should have comment or be unexported (golint)
    • toggleperfect/internal/apps/timetoggle/app/repo/report.go
    • Line 7: warning: exported type ReportCapturesList should have comment or be unexported (golint)
    • Line 11: warning: exported type ReportCapturesCapture should have comment or be unexported (golint)
    • Line 18: warning: exported function TimeSpanMonth should have comment or be unexported (golint)
    • Line 25: warning: exported function TimeSpanDay should have comment or be unexported (golint)
    • Line 32: warning: exported type TimeSpan should have comment or be unexported (golint)
    • Line 37: warning: exported function GetTodayCaptures should have comment or be unexported (golint)
    • Line 41: warning: exported function GetMonthCaptures should have comment or be unexported (golint)
    • Line 45: warning: exported function GetReportCaptures should have comment or be unexported (golint)
    • toggleperfect/internal/apps/timetoggle/app/apihandler.go
    • Line 12: warning: exported type GetProjectListHandler should have comment or be unexported (golint)
    • Line 14: warning: exported method GetProjectListHandler.Handle should have comment or be unexported (golint)
    • Line 30: warning: exported type AddProjectHandler should have comment or be unexported (golint)
    • Line 33: warning: exported method AddProjectHandler.Handle should have comment or be unexported (golint)
    • Line 41: warning: exported type DeleteProjectHandler should have comment or be unexported (golint)
    • Line 44: warning: exported method DeleteProjectHandler.Handle should have comment or be unexported (golint)
    • Line 52: warning: exported type GetProjectHandler should have comment or be unexported (golint)
    • Line 55: warning: exported method GetProjectHandler.Handle should have comment or be unexported (golint)
    • Line 73: warning: exported type GetCaptureListHandler should have comment or be unexported (golint)
    • Line 75: warning: exported method GetCaptureListHandler.Handle should have comment or be unexported (golint)
    • Line 96: warning: exported type AddCaptureStartHandler should have comment or be unexported (golint)
    • Line 98: warning: exported method AddCaptureStartHandler.Handle should have comment or be unexported (golint)
    • Line 111: warning: exported type AddCaptureStopHandler should have comment or be unexported (golint)
    • Line 113: warning: exported method AddCaptureStopHandler.Handle should have comment or be unexported (golint)
    • Line 122: warning: exported type SetCaptureLatestStopHandler should have comment or be unexported (golint)
    • Line 124: warning: exported method SetCaptureLatestStopHandler.Handle should have comment or be unexported (golint)
    • Line 133: warning: exported type GetReportCapturesTodayHandler should have comment or be unexported (golint)
    • Line 135: warning: exported method GetReportCapturesTodayHandler.Handle should have comment or be unexported (golint)
    • Line 146: warning: exported type GetReportCapturesCurrentMonthHandler should have comment or be unexported (golint)
    • Line 149: warning: exported method GetReportCapturesCurrentMonthHandler.Handle should have comment or be unexported (golint)
    • toggleperfect/internal/apps/timetoggle/app/pagination.go
    • Line 8: warning: exported type Pagination should have comment or be unexported (golint)
    • Line 14: warning: exported method Pagination.Index should have comment or be unexported (golint)
    • Line 17: warning: exported method Pagination.NextPage should have comment or be unexported (golint)
    • Line 25: warning: exported method Pagination.HasPage should have comment or be unexported (golint)
    • Line 33: warning: exported method Pagination.GetLastPage should have comment or be unexported (golint)
    • Line 37: warning: exported method Pagination.GetCurrentPageItems should have comment or be unexported (golint)
    • Line 51: warning: exported method Pagination.GetPageIndices should have comment or be unexported (golint)
    • toggleperfect/internal/remote/pins.go
    • Line 8: warning: exported type LedStateNotifier should have comment or be unexported (golint)
    • Line 13: warning: exported method LedStateNotifier.High should have comment or be unexported (golint)
    • Line 20: warning: exported method LedStateNotifier.Low should have comment or be unexported (golint)
    • Line 27: warning: exported type KeyStateReceiver should have comment or be unexported (golint)
    • Line 29: warning: exported method KeyStateReceiver.IsKeyPressed should have comment or be unexported (golint)
    • Line 33: warning: exported function Key should have comment or be unexported (golint)
    • Line 53: warning: exported function LedPins should have comment or be unexported (golint)
    • Line 62: warning: exported function KeyPins should have comment or be unexported (golint)
    • toggleperfect/internal/apps/leddemo/app/app.go
    • Line 14: warning: exported type LedDemo should have comment or be unexported (golint)
    • Line 20: warning: exported method LedDemo.Init should have comment or be unexported (golint)
    • Line 24: warning: exported method LedDemo.Dispose should have comment or be unexported (golint)
    • Line 28: warning: exported method LedDemo.Activate should have comment or be unexported (golint)
    • Line 69: warning: exported method LedDemo.Deactivate should have comment or be unexported (golint)
    • Line 74: warning: exported method LedDemo.HandleEvent should have comment or be unexported (golint)
    • toggleperfect/internal/rpio/pins.go
    • Line 9: warning: exported function LedPin should have comment or be unexported (golint)
    • Line 15: warning: exported function KeyPin should have comment or be unexported (golint)
    • Line 23: warning: exported type Key should have comment or be unexported (golint)
    • Line 27: warning: exported method Key.IsKeyPressed should have comment or be unexported (golint)
    • Line 31: warning: exported function LedPins should have comment or be unexported (golint)
    • Line 40: warning: exported function KeyPins should have comment or be unexported (golint)
    • toggleperfect/internal/apps/birthdayreminder/app/app.go
    • Line 11: warning: exported type BirthdayReminder should have comment or be unexported (golint)
    • Line 16: warning: exported method BirthdayReminder.Init should have comment or be unexported (golint)
    • Line 20: warning: exported method BirthdayReminder.Dispose should have comment or be unexported (golint)
    • Line 24: warning: exported method BirthdayReminder.Activate should have comment or be unexported (golint)
    • Line 30: warning: exported method BirthdayReminder.Deactivate should have comment or be unexported (golint)
    • Line 34: warning: exported method BirthdayReminder.HandleEvent 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!