Preparing report...

Report for github.com/d2r2/go-rsync

A    Great!    Found 32 issues across 47 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!


golint42%

Golint is a linter for Go source code.

    • go-rsync/ui/gtkui/utils.go
    • Line 31: warning: exported function PixbufFromAssetsNew should have comment or be unexported (golint)
    • Line 49: warning: exported function PixbufFromAssetsNewWithResize should have comment or be unexported (golint)
    • Line 69: warning: exported function PixbufAnimationFromAssetsNew should have comment or be unexported (golint)
    • Line 87: warning: exported function PixbufAnimationFromAssetsNewWithResize should have comment or be unexported (golint)
    • Line 107: warning: exported function AnimationImageFromAssetsNew should have comment or be unexported (golint)
    • Line 119: warning: exported function AnimationImageFromAssetsNewWithResize should have comment or be unexported (golint)
    • Line 133: warning: exported function ImageFromAssetsNew should have comment or be unexported (golint)
    • Line 146: warning: exported function ImageFromAssetsNewWithResize should have comment or be unexported (golint)
    • Line 159: warning: exported function SetEntryIconWithAssetImage should have comment or be unexported (golint)
    • Line 168: warning: exported function SetupButtonWithAssetAnimationImage should have comment or be unexported (golint)
    • Line 219: warning: exported function NewProgressBarManage should have comment or be unexported (golint)
    • Line 224: warning: exported method ProgressBarManage.StartPulse should have comment or be unexported (golint)
    • Line 255: warning: exported method ProgressBarManage.StopPulse should have comment or be unexported (golint)
    • Line 265: warning: exported method ProgressBarManage.SetFraction should have comment or be unexported (golint)
    • Line 276: warning: exported method ProgressBarManage.AddProgressBarStyleClass should have comment or be unexported (golint)
    • Line 289: warning: exported method ProgressBarManage.RemoveProgressBarStyleClass should have comment or be unexported (golint)
    • Line 310: warning: exported function NewControlWithStatus should have comment or be unexported (golint)
    • Line 321: warning: exported method ControlWithStatus.ReplaceStatus should have comment or be unexported (golint)
    • Line 333: warning: exported method ControlWithStatus.GetBox should have comment or be unexported (golint)
    • Line 337: warning: exported type GLibIdleCallStub should have comment or be unexported (golint)
    • Line 343: warning: exported var IdleAdd should have comment or be unexported (golint)
    • Line 349: warning: exported var MustIdleAdd should have comment or be unexported (golint)
    • Line 430: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-rsync/ui/gtkui/prefdlg.go
    • Line 36: warning: exported const STOCK_WARNING_ICON should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: comment on exported const STOCK_OK_ICON should be of the form "STOCK_OK_ICON ..." (golint)
    • Line 41: warning: comment on exported const STOCK_IMPORTANT_ICON should be of the form "STOCK_IMPORTANT_ICON ..." (golint)
    • Line 47: warning: comment on exported const STOCK_NETWORK_ERROR_ICON should be of the form "STOCK_NETWORK_ERROR_ICON ..." (golint)
    • Line 60: warning: exported const DesignIndentCol should have comment (or a comment on this block) or be unexported (golint)
    • Line 352: warning: exported function GetFolderNamesEmptyOrLeadingTrailingSpacesFoundRegexp should have comment or be unexported (golint)
    • Line 2028: warning: exported const ProfileStatusNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 2033: warning: exported type ProfileStatus should have comment or be unexported (golint)
    • Line 2038: warning: exported type RestartService should have comment or be unexported (golint)
    • Line 2051: warning: exported type RsyncSource should have comment or be unexported (golint)
    • Line 2370: warning: exported function PreferenceRowListNew should have comment or be unexported (golint)
    • Line 2376: warning: exported method PreferenceRowList.Append should have comment or be unexported (golint)
    • Line 2381: warning: exported method PreferenceRowList.Delete should have comment or be unexported (golint)
    • Line 2391: warning: exported method PreferenceRowList.Get should have comment or be unexported (golint)
    • Line 2395: warning: exported method PreferenceRowList.GetLastProfileListIndex should have comment or be unexported (golint)
    • Line 2405: warning: exported method PreferenceRowList.GetProfileCount should have comment or be unexported (golint)
    • Line 2415: warning: exported method PreferenceRowList.GetProfiles should have comment or be unexported (golint)
    • go-rsync/backup/heuristic.go
    • Line 128: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 381: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-rsync/core/info.go
    • Line 60: warning: exported function SetAppRunMode should have comment or be unexported (golint)
    • Line 81: warning: exported function GetAppRunMode should have comment or be unexported (golint)
    • Line 90: warning: comment on exported function GetAppArchitecture should be of the form "GetAppArchitecture ..." (golint)
    • go-rsync/gorsync.go
    • Line 31: warning: exported const MsgMainAppSubsystemInitialized should have comment (or a comment on this block) or be unexported (golint)
    • go-rsync/ui/gtkui/app.go
    • Line 903: warning: exported method ProfileObjects.CheckAndClearReselect should have comment or be unexported (golint)
    • Line 912: warning: exported method ProfileObjects.SetReselect should have comment or be unexported (golint)
    • Line 920: warning: exported method ProfileObjects.PerformBackupPlanStage should have comment or be unexported (golint)
    • go-rsync/ui/gtkui/notifier.go
    • Line 55: warning: exported function NewNotifierUI should have comment or be unexported (golint)
    • Line 60: warning: exported method NotifierUI.Done should have comment or be unexported (golint)
    • Line 75: warning: don't use underscores in Go names; method NotifyPlanStage_NodeStructureStartInquiry should be NotifyPlanStageNodeStructureStartInquiry (golint)
    • Line 86: warning: don't use underscores in Go names; method NotifyPlanStage_NodeStructureDoneInquiry should be NotifyPlanStageNodeStructureDoneInquiry (golint)
    • Line 118: warning: don't use underscores in Go names; method NotifyBackupStage_FolderStartBackup should be NotifyBackupStageFolderStartBackup (golint)
    • Line 140: warning: don't use underscores in Go names; method NotifyBackupStage_FolderDoneBackup should be NotifyBackupStageFolderDoneBackup (golint)
    • Line 570: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 576: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 727: warning: comment on exported method NotifierUI.ReportCompletion should be of the form "ReportCompletion ..." (golint)
    • go-rsync/rsync/abstract.go
    • Line 39: warning: exported function NewErrorHook should have comment or be unexported (golint)
    • Line 54: warning: exported function NewOptions should have comment or be unexported (golint)
    • go-rsync/rsync/errors.go
    • Line 131: 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)
    • go-rsync/rsync/utils.go
    • Line 54: warning: comment on exported function ObtainDirFullSize should be of the form "ObtainDirFullSize ..." (golint)
    • Line 92: 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)
    • go-rsync/ui/gtkui/settings.go
    • Line 15: warning: exported const APP_SCHEMA_ID should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported const CFG_IGNORE_FILE_SIGNATURE should have comment (or a comment on this block) or be unexported (golint)
    • go-rsync/ui/gtkui/validator.go
    • Line 66: warning: exported function GroupMapNew should have comment or be unexported (golint)
    • Line 132: warning: exported function UIValidatorNew should have comment or be unexported (golint)
    • Line 222: warning: context.Context should be the first parameter of a function (golint)
    • go-rsync/backup/progress.go
    • Line 182: warning: don't use underscores in Go names; method EventPlanStage_NodeStructureStartInquiry should be EventPlanStageNodeStructureStartInquiry (golint)
    • Line 202: warning: don't use underscores in Go names; method EventPlanStage_NodeStructureDoneInquiry should be EventPlanStageNodeStructureDoneInquiry (golint)
    • Line 229: warning: don't use underscores in Go names; method EventBackupStage_FolderStartBackup should be EventBackupStageFolderStartBackup (golint)
    • Line 271: warning: don't use underscores in Go names; method EventBackupStage_FolderDoneBackup should be EventBackupStageFolderDoneBackup (golint)
    • go-rsync/ui/gtkui/settingstools.go
    • Line 95: 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)
    • go-rsync/core/format.go
    • Line 128: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 137: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 146: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 155: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 164: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 173: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 182: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

gocyclo74%

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.

    • go-rsync/ui/gtkui/prefdlg.go
    • Line 362: warning: cyclomatic complexity 136 of function createBackupSourceBlock() is high (> 15) (gocyclo)
    • Line 2456: warning: cyclomatic complexity 54 of function CreatePreferenceDialog() is high (> 15) (gocyclo)
    • Line 1304: warning: cyclomatic complexity 52 of function ProfilePreferencesNew() is high (> 15) (gocyclo)
    • Line 1646: warning: cyclomatic complexity 45 of function AdvancedPreferencesNew() is high (> 15) (gocyclo)
    • Line 68: warning: cyclomatic complexity 33 of function GeneralPreferencesNew() is high (> 15) (gocyclo)
    • Line 1193: warning: cyclomatic complexity 18 of function createBackupSourceBlock2() is high (> 15) (gocyclo)
    • go-rsync/ui/gtkui/app.go
    • Line 981: warning: cyclomatic complexity 44 of function createMainForm() is high (> 15) (gocyclo)
    • Line 1286: warning: cyclomatic complexity 18 of function CreateApp() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 17 of function createRunBackupAction() is high (> 15) (gocyclo)
    • go-rsync/ui/gtkui/uitools.go
    • Line 625: warning: cyclomatic complexity 27 of function SetupDialog() is high (> 15) (gocyclo)
    • Line 517: warning: cyclomatic complexity 18 of function SetupMessageDialog() is high (> 15) (gocyclo)
    • go-rsync/ui/gtkui/notifier.go
    • Line 728: warning: cyclomatic complexity 17 of function (*NotifierUI).ReportCompletion() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 16 of function (*NotifierUI).CreateProgressControls() is high (> 15) (gocyclo)
    • go-rsync/backup/process.go
    • Line 443: warning: cyclomatic complexity 21 of function backupDir() is high (> 15) (gocyclo)
    • Line 233: warning: cyclomatic complexity 19 of function runBackup() is high (> 15) (gocyclo)

ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • go-rsync/ui/gtkui/prefdlg.go
    • Line 255: warning: ineffectual assignment to row (ineffassign)
    • Line 628: warning: ineffectual assignment to row3 (ineffassign)
    • Line 700: warning: ineffectual assignment to row2 (ineffassign)
    • Line 717: warning: ineffectual assignment to row (ineffassign)
    • Line 2010: warning: ineffectual assignment to row (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!