Preparing report...

Report for github.com/andreacioni/motionctrl

A+    Excellent!    Found 20 issues across 33 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!


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.

    • motionctrl/motion/config.go
    • Line 16: warning: exported const KeyValueRegex should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported const ConfigWebControlPort should be of the form "ConfigWebControlPort ..." (golint)
    • Line 29: warning: exported const ConfigStreamPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported var ConfigTypeMapper should have comment or be unexported (golint)
    • Line 80: warning: exported var ReverseConfigTypeMapper should have comment or be unexported (golint)
    • Line 93: warning: exported function ConfigList should have comment or be unexported (golint)
    • Line 110: warning: exported function ConfigGet should have comment or be unexported (golint)
    • Line 137: warning: exported function ConfigCanSet should have comment or be unexported (golint)
    • Line 142: warning: exported function ConfigSet should have comment or be unexported (golint)
    • Line 155: warning: exported function ConfigWrite should have comment or be unexported (golint)
    • motionctrl/notify/notify.go
    • Line 17: warning: exported type NotifyService should have comment or be unexported (golint)
    • Line 23: warning: exported type State should have comment or be unexported (golint)
    • Line 26: warning: exported const TelegramNotifyMethod should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported function Init should have comment or be unexported (golint)
    • Line 78: warning: exported function Shutdown should have comment or be unexported (golint)
    • Line 97: warning: exported function MotionDetectedStart should have comment or be unexported (golint)
    • Line 114: warning: exported function MotionDetectedStop should have comment or be unexported (golint)
    • Line 129: warning: exported function PhotoSaved should have comment or be unexported (golint)
    • Line 158: warning: exported function IsReady should have comment or be unexported (golint)
    • Line 165: warning: exported function IsActive should have comment or be unexported (golint)
    • Line 172: warning: exported function SetActive should have comment or be unexported (golint)
    • motionctrl/backup/google.go
    • Line 20: warning: exported type GoogleDriveBackupService should have comment or be unexported (golint)
    • Line 24: warning: exported method GoogleDriveBackupService.Authenticate should have comment or be unexported (golint)
    • Line 44: warning: exported method GoogleDriveBackupService.Upload should have comment or be unexported (golint)
    • motionctrl/motion/camera.go
    • Line 10: warning: exported function Snapshot should have comment or be unexported (golint)
    • Line 38: warning: exported function MakeMovie should have comment or be unexported (golint)
    • motionctrl/notify/mock.go
    • Line 3: warning: exported type MockNotifyService should have comment or be unexported (golint)
    • Line 6: warning: exported method MockNotifyService.Notify should have comment or be unexported (golint)
    • Line 10: warning: exported method MockNotifyService.Authenticate should have comment or be unexported (golint)
    • Line 14: warning: exported method MockNotifyService.Stop should have comment or be unexported (golint)
    • motionctrl/notify/telegram.go
    • Line 11: warning: exported type TelegramNotifyService should have comment or be unexported (golint)
    • Line 18: warning: exported method TelegramNotifyService.Authenticate should have comment or be unexported (golint)
    • Line 32: warning: exported method TelegramNotifyService.Notify should have comment or be unexported (golint)
    • Line 57: warning: exported method TelegramNotifyService.Stop should have comment or be unexported (golint)
    • motionctrl/config/config.go
    • Line 14: warning: exported const BaseAddress should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 29: warning: exported type SSL should have comment or be unexported (golint)
    • Line 34: warning: exported type Backup should have comment or be unexported (golint)
    • Line 42: warning: exported type Notify should have comment or be unexported (golint)
    • Line 82: warning: exported function Unload should have comment or be unexported (golint)
    • Line 91: warning: exported function GetConfig should have comment or be unexported (golint)
    • Line 98: warning: exported function GetSSLConfig should have comment or be unexported (golint)
    • Line 105: warning: exported function GetBackupConfig should have comment or be unexported (golint)
    • Line 112: warning: exported function GetNotifyConfig should have comment or be unexported (golint)
    • Line 119: warning: exported method Configuration.IsEmpty should have comment or be unexported (golint)
    • Line 123: warning: exported method SSL.IsEmpty should have comment or be unexported (golint)
    • Line 127: warning: exported method Notify.IsEmpty should have comment or be unexported (golint)
    • Line 131: warning: exported method Backup.IsEmpty should have comment or be unexported (golint)
    • motionctrl/motion/motion.go
    • Line 18: warning: exported function Init should have comment or be unexported (golint)
    • Line 49: warning: exported function GetStreamBaseURL should have comment or be unexported (golint)
    • Line 53: warning: exported function GetBaseURL should have comment or be unexported (golint)
    • motionctrl/backup/mock.go
    • Line 3: warning: exported type MockBackupService should have comment or be unexported (golint)
    • Line 6: warning: exported method MockBackupService.Upload should have comment or be unexported (golint)
    • Line 10: warning: exported method MockBackupService.Authenticate should have comment or be unexported (golint)
    • motionctrl/utils/regex.go
    • Line 7: warning: exported function RegexFirstSubmatchString should have comment or be unexported (golint)
    • Line 18: warning: exported function RegexSubmatchTypedMap should have comment or be unexported (golint)
    • Line 36: warning: exported function RegexMustMatch should have comment or be unexported (golint)
    • motionctrl/utils/slice.go
    • Line 8: warning: exported function InSlice should have comment or be unexported (golint)
    • Line 28: warning: exported function BlockSlideSlice should have comment or be unexported (golint)
    • Line 45: warning: exported function ToInt64Slice should have comment or be unexported (golint)
    • motionctrl/motion/detection.go
    • Line 10: warning: exported const DetectionStatusRegex should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function IsMotionDetectionEnabled should have comment or be unexported (golint)
    • Line 38: warning: exported function EnableMotionDetection should have comment or be unexported (golint)
    • Line 50: warning: exported function DisableMotionDetection should have comment or be unexported (golint)
    • motionctrl/motion/targetdir.go
    • Line 12: warning: exported type TargetDirFile should have comment or be unexported (golint)
    • Line 17: warning: exported function TargetDirListFiles should have comment or be unexported (golint)
    • Line 29: warning: exported function TargetDirSize should have comment or be unexported (golint)
    • Line 39: warning: exported function TargetDirGetFile should have comment or be unexported (golint)
    • Line 43: warning: exported function TargetDirRemoveFile should have comment or be unexported (golint)
    • motionctrl/backup/backup.go
    • Line 24: warning: exported type UploadService should have comment or be unexported (golint)
    • Line 29: warning: exported type State should have comment or be unexported (golint)
    • Line 32: warning: exported const StateActiveIdle should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported const GoogleDriveMethod should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported function Init should have comment or be unexported (golint)
    • Line 109: warning: exported function Shutdown should have comment or be unexported (golint)
    • Line 124: warning: exported function RunNow should have comment or be unexported (golint)
    • Line 137: warning: exported function GetStatus should have comment or be unexported (golint)
    • motionctrl/motion/control.go
    • Line 28: warning: exported function Startup should have comment or be unexported (golint)
    • Line 52: warning: exported function Shutdown should have comment or be unexported (golint)
    • Line 74: warning: exported function Restart should have comment or be unexported (golint)
    • Line 103: warning: exported function IsStarted should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words