Preparing report...

Report for github.com/adobe/butler

A+    Excellent!    Found 25 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!


gocyclo87%

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.

    • butler/internal/config/handler.go
    • Line 277: warning: cyclomatic complexity 28 of function (*ButlerConfig).RunCMHandler() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 16 of function (*ButlerConfig).Handler() is high (> 15) (gocyclo)

golint36%

Golint is a linter for Go source code.

    • butler/internal/alog/alog.go
    • Line 27: warning: exported const ApacheFormatPattern should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type ApacheLogRecord should have comment or be unexported (golint)
    • Line 41: warning: exported method ApacheLogRecord.Log should have comment or be unexported (golint)
    • Line 57: warning: exported method ApacheLogRecord.WriteHeader should have comment or be unexported (golint)
    • Line 62: warning: exported type ApacheLoggingHandler should have comment or be unexported (golint)
    • Line 67: warning: exported function NewApacheLoggingHandler should have comment or be unexported (golint)
    • butler/internal/reloaders/reloaders.go
    • Line 24: warning: exported type Reloader should have comment or be unexported (golint)
    • Line 32: warning: exported type ReloaderOpts should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 78: warning: exported function NewReloaderError should have comment or be unexported (golint)
    • Line 82: warning: exported method ReloaderError.WithCode should have comment or be unexported (golint)
    • Line 87: warning: exported method ReloaderError.WithMessage should have comment or be unexported (golint)
    • Line 97: warning: exported type ReloaderError should have comment or be unexported (golint)
    • butler/internal/config/handler.go
    • Line 34: warning: exported type ButlerConfig should have comment or be unexported (golint)
    • Line 54: warning: exported method ButlerConfig.SetScheme should have comment or be unexported (golint)
    • Line 70: warning: exported method ButlerConfig.Scheme should have comment or be unexported (golint)
    • Line 74: warning: exported method ButlerConfig.SetPath should have comment or be unexported (golint)
    • Line 81: warning: exported method ButlerConfig.SetMethodOpts should have comment or be unexported (golint)
    • Line 86: warning: exported method ButlerConfig.Path should have comment or be unexported (golint)
    • Line 90: warning: exported method ButlerConfig.Host should have comment or be unexported (golint)
    • Line 94: warning: exported method ButlerConfig.URL should have comment or be unexported (golint)
    • Line 98: warning: exported method ButlerConfig.SetURL should have comment or be unexported (golint)
    • Line 102: warning: exported method ButlerConfig.Opts should have comment or be unexported (golint)
    • Line 106: warning: exported method ButlerConfig.SetInterval should have comment or be unexported (golint)
    • Line 112: warning: exported method ButlerConfig.GetCMInterval should have comment or be unexported (golint)
    • Line 116: warning: exported method ButlerConfig.SetCMInterval should have comment or be unexported (golint)
    • Line 121: warning: exported method ButlerConfig.GetCMPrevInterval should have comment or be unexported (golint)
    • Line 125: warning: exported method ButlerConfig.SetCMPrevInterval should have comment or be unexported (golint)
    • Line 130: warning: exported method ButlerConfig.GetInterval should have comment or be unexported (golint)
    • Line 134: warning: exported method ButlerConfig.SetTimeout should have comment or be unexported (golint)
    • Line 140: warning: exported method ButlerConfig.SetLogLevel should have comment or be unexported (golint)
    • Line 147: warning: exported method ButlerConfig.GetLogLevel should have comment or be unexported (golint)
    • Line 151: warning: exported method ButlerConfig.Init should have comment or be unexported (golint)
    • Line 168: warning: exported method ButlerConfig.Handler should have comment or be unexported (golint)
    • Line 271: warning: exported method ButlerConfig.SetScheduler should have comment or be unexported (golint)
    • Line 277: warning: exported method ButlerConfig.RunCMHandler should have comment or be unexported (golint)
    • Line 401: warning: exported method ButlerConfig.GetManagers should have comment or be unexported (golint)
    • Line 405: warning: exported method ButlerConfig.GetManager should have comment or be unexported (golint)
    • Line 409: warning: exported method ButlerConfig.GetStatusFile should have comment or be unexported (golint)
    • Line 413: warning: exported method ButlerConfig.CheckPaths should have comment or be unexported (golint)
    • butler/internal/config/helpers.go
    • Line 42: warning: exported function IsValidScheme should have comment or be unexported (golint)
    • Line 290: warning: exported function ParseMustacheSubs should have comment or be unexported (golint)
    • Line 313: warning: exported function ValidateMustacheSubs should have comment or be unexported (golint)
    • Line 357: warning: exported function CompareAndCopy should have comment or be unexported (golint)
    • Line 374: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 447: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 502: warning: exported function GetManagerOpts should have comment or be unexported (golint)
    • Line 579: warning: exported function GetConfigManager should have comment or be unexported (golint)
    • Line 669: warning: exported function ParseConfig should have comment or be unexported (golint)
    • Line 741: warning: exported function NewButlerConfig should have comment or be unexported (golint)
    • Line 751: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 756: warning: exported function NewConfigChanEvent should have comment or be unexported (golint)
    • Line 765: warning: exported function NewConfigClient should have comment or be unexported (golint)
    • Line 776: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 833: warning: exported function NewConfigSettings should have comment or be unexported (golint)
    • butler/internal/methods/file.go
    • Line 27: warning: exported type FileMethod should have comment or be unexported (golint)
    • Line 32: warning: exported type FileMethodOpts should have comment or be unexported (golint)
    • Line 36: warning: exported function NewFileMethod should have comment or be unexported (golint)
    • Line 59: warning: exported function NewFileMethodWithURL should have comment or be unexported (golint)
    • Line 70: warning: exported method FileMethod.Get should have comment or be unexported (golint)
    • Line 88: warning: exported method FileMethodOpts.GetScheme should have comment or be unexported (golint)
    • butler/internal/metrics/metrics.go
    • Line 166: warning: exported function SetButlerReloadVal should have comment or be unexported (golint)
    • Line 177: warning: exported function DeleteButlerReloadVal should have comment or be unexported (golint)
    • Line 184: warning: exported function SetButlerRenderVal should have comment or be unexported (golint)
    • Line 193: warning: exported function SetButlerWriteVal should have comment or be unexported (golint)
    • Line 202: warning: exported function SetButlerConfigVal should have comment or be unexported (golint)
    • Line 210: warning: exported function SetButlerContactVal should have comment or be unexported (golint)
    • Line 219: warning: exported function SetButlerContactRetryVal should have comment or be unexported (golint)
    • Line 230: warning: exported function SetButlerKnownGoodCachedVal should have comment or be unexported (golint)
    • Line 238: warning: exported function SetButlerKnownGoodRestoredVal should have comment or be unexported (golint)
    • Line 246: warning: exported function SetButlerReloaderRetry should have comment or be unexported (golint)
    • Line 250: warning: exported function SetButlerRemoteRepoUp should have comment or be unexported (golint)
    • Line 258: warning: exported function SetButlerRemoteRepoSanity should have comment or be unexported (golint)
    • Line 266: warning: exported function SetButlerRepoInSync should have comment or be unexported (golint)
    • butler/internal/reloaders/generic.go
    • Line 19: warning: exported function NewGenericReloader should have comment or be unexported (golint)
    • Line 23: warning: exported function NewGenericReloaderWithCustomError should have comment or be unexported (golint)
    • Line 27: warning: exported type GenericReloader should have comment or be unexported (golint)
    • Line 31: warning: exported type GenericReloaderOpts should have comment or be unexported (golint)
    • Line 34: warning: exported method GenericReloader.Reload should have comment or be unexported (golint)
    • Line 40: warning: exported method GenericReloader.GetMethod should have comment or be unexported (golint)
    • Line 43: warning: exported method GenericReloader.GetOpts should have comment or be unexported (golint)
    • Line 47: warning: exported method GenericReloader.SetOpts should have comment or be unexported (golint)
    • Line 52: warning: exported method GenericReloader.SetCounter should have comment or be unexported (golint)
    • butler/internal/config/config.go
    • Line 33: warning: exported var ConfigSchedulerInterval should have comment or be unexported (golint)
    • Line 46: warning: exported type ButlerConfigOpts should have comment or be unexported (golint)
    • Line 52: warning: exported type ConfigClient should have comment or be unexported (golint)
    • Line 58: warning: exported method ConfigClient.SetTimeout should have comment or be unexported (golint)
    • Line 66: warning: exported method ConfigClient.SetRetryMax should have comment or be unexported (golint)
    • Line 74: warning: exported method ConfigClient.SetRetryWaitMin should have comment or be unexported (golint)
    • Line 81: warning: exported method ConfigClient.SetRetryWaitMax should have comment or be unexported (golint)
    • Line 88: warning: exported method ConfigClient.Get should have comment or be unexported (golint)
    • Line 102: warning: exported method ConfigSettings.ParseConfig should have comment or be unexported (golint)
    • butler/internal/config/manager.go
    • Line 33: warning: exported type Manager should have comment or be unexported (golint)
    • Line 54: warning: exported type ManagerOpts should have comment or be unexported (golint)
    • Line 69: warning: exported method Manager.Reload should have comment or be unexported (golint)
    • Line 74: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 79: warning: exported method Manager.DownloadPrimaryConfigFiles should have comment or be unexported (golint)
    • Line 166: warning: exported method Manager.DownloadAdditionalConfigFiles should have comment or be unexported (golint)
    • Line 241: warning: comment on exported method Manager.PathCleanup should be of the form "PathCleanup ..." (golint)
    • Line 269: warning: exported method Manager.GetAllLocalPaths should have comment or be unexported (golint)
    • Line 283: warning: exported method ManagerOpts.AppendPrimaryConfigURL should have comment or be unexported (golint)
    • Line 289: warning: exported method ManagerOpts.AppendPrimaryConfigFile should have comment or be unexported (golint)
    • Line 295: warning: exported method ManagerOpts.AppendAdditionalConfigURL should have comment or be unexported (golint)
    • Line 301: warning: exported method ManagerOpts.AppendAdditionalConfigFile should have comment or be unexported (golint)
    • Line 307: warning: exported method ManagerOpts.SetParentManager should have comment or be unexported (golint)
    • Line 312: warning: exported method ManagerOpts.GetPrimaryConfigURLs should have comment or be unexported (golint)
    • Line 316: warning: exported method ManagerOpts.GetPrimaryLocalConfigFiles should have comment or be unexported (golint)
    • Line 320: warning: exported method ManagerOpts.GetPrimaryRemoteConfigFiles should have comment or be unexported (golint)
    • Line 324: warning: exported method ManagerOpts.GetAdditionalConfigURLs should have comment or be unexported (golint)
    • Line 328: warning: exported method ManagerOpts.GetAdditionalLocalConfigFiles should have comment or be unexported (golint)
    • Line 332: warning: exported method ManagerOpts.GetAdditionalRemoteConfigFiles should have comment or be unexported (golint)
    • Line 336: warning: comment on exported method ManagerOpts.DownloadConfigFile should be of the form "DownloadConfigFile ..." (golint)
    • Line 396: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • butler/internal/config/objects.go
    • Line 20: warning: exported var ConfigCache should have comment or be unexported (golint)
    • Line 23: warning: exported type TmpFile should have comment or be unexported (golint)
    • Line 28: warning: exported type RepoFileEvent should have comment or be unexported (golint)
    • Line 34: warning: exported method RepoFileEvent.SetSuccess should have comment or be unexported (golint)
    • Line 40: warning: exported method RepoFileEvent.SetFailure should have comment or be unexported (golint)
    • Line 46: warning: exported method RepoFileEvent.SetTmpFile should have comment or be unexported (golint)
    • Line 51: warning: exported type ConfigFileMap should have comment or be unexported (golint)
    • Line 56: warning: exported type ConfigSettings should have comment or be unexported (golint)
    • Line 61: warning: exported method ConfigSettings.GetAllConfigLocalPaths should have comment or be unexported (golint)
    • Line 77: warning: exported type ConfigGlobals should have comment or be unexported (golint)
    • Line 97: warning: exported type ValidateOpts should have comment or be unexported (golint)
    • Line 104: warning: exported function NewValidateOpts should have comment or be unexported (golint)
    • Line 108: warning: exported method ValidateOpts.WithContentType should have comment or be unexported (golint)
    • Line 113: warning: exported method ValidateOpts.WithData should have comment or be unexported (golint)
    • Line 118: warning: exported method ValidateOpts.WithFileName should have comment or be unexported (golint)
    • Line 123: warning: exported method ValidateOpts.WithManager should have comment or be unexported (golint)
    • butler/internal/methods/s3.go
    • Line 35: warning: exported type S3Method should have comment or be unexported (golint)
    • Line 45: warning: exported type S3MethodOpts should have comment or be unexported (golint)
    • Line 54: warning: exported function NewS3Method should have comment or be unexported (golint)
    • Line 109: warning: exported function NewS3MethodWithOpts should have comment or be unexported (golint)
    • Line 130: warning: exported method S3Method.Get should have comment or be unexported (golint)
    • Line 184: warning: exported method S3MethodOpts.GetScheme should have comment or be unexported (golint)
    • butler/internal/config/chan.go
    • Line 153: warning: exported method ConfigChanEvent.SetTmpFile should have comment or be unexported (golint)
    • Line 160: warning: exported method ConfigChanEvent.CopyPrimaryConfigFiles should have comment or be unexported (golint)
    • Line 178: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 210: warning: exported method ConfigChanEvent.CopyAdditionalConfigFiles should have comment or be unexported (golint)
    • butler/internal/config/status.go
    • Line 23: warning: exported type Status should have comment or be unexported (golint)
    • Line 27: warning: exported function ReadManagerStatusFile should have comment or be unexported (golint)
    • Line 44: warning: exported function WriteManagerStatusFile should have comment or be unexported (golint)
    • Line 63: warning: exported function GetManagerStatus should have comment or be unexported (golint)
    • Line 73: 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 79: warning: exported function SetManagerStatus should have comment or be unexported (golint)
    • butler/internal/methods/methods.go
    • Line 22: warning: exported type Method should have comment or be unexported (golint)
    • Line 26: warning: exported type MethodOpts should have comment or be unexported (golint)
    • Line 30: warning: exported type Response should have comment or be unexported (golint)
    • Line 35: warning: exported method Response.GetResponseBody should have comment or be unexported (golint)
    • Line 39: warning: exported method Response.GetResponseStatusCode should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • butler/cmd/butler/main.go
    • Line 44: warning: exported var ConfigCache should have comment or be unexported (golint)
    • Line 50: warning: exported function SetLogLevel should have comment or be unexported (golint)
    • butler/internal/methods/blob.go
    • Line 29: warning: exported type BlobMethod should have comment or be unexported (golint)
    • Line 36: warning: exported type BlobMethodOpts should have comment or be unexported (golint)
    • Line 42: warning: exported function NewBlobMethod should have comment or be unexported (golint)
    • Line 84: warning: exported function NewBlobMethodWithAccountAndKey should have comment or be unexported (golint)
    • Line 112: warning: exported method BlobMethod.Get should have comment or be unexported (golint)
    • Line 136: warning: exported method BlobMethod.SetStorageAccount should have comment or be unexported (golint)
    • Line 140: warning: exported method BlobMethod.SetStorageKey should have comment or be unexported (golint)
    • Line 144: warning: exported method BlobMethodOpts.GetScheme should have comment or be unexported (golint)
    • butler/internal/methods/etcd.go
    • Line 34: warning: exported type EtcdMethod should have comment or be unexported (golint)
    • Line 42: warning: exported type EtcdMethodOpts should have comment or be unexported (golint)
    • Line 61: warning: exported function NewEtcdMethod should have comment or be unexported (golint)
    • Line 97: warning: exported function NewEtcdMethodWithEndpoints should have comment or be unexported (golint)
    • Line 120: warning: exported method EtcdMethod.Get should have comment or be unexported (golint)
    • Line 138: warning: exported function GetEtcdKey should have comment or be unexported (golint)
    • Line 142: warning: exported method EtcdMethodOpts.GetScheme should have comment or be unexported (golint)
    • butler/internal/methods/generic.go
    • Line 20: warning: exported type GenericMethod should have comment or be unexported (golint)
    • Line 23: warning: exported type GenericMethodOpts should have comment or be unexported (golint)
    • Line 27: warning: exported function NewGenericMethod should have comment or be unexported (golint)
    • Line 31: warning: exported method GenericMethod.Get should have comment or be unexported (golint)
    • Line 38: warning: exported method GenericMethodOpts.GetScheme should have comment or be unexported (golint)
    • butler/internal/methods/http.go
    • Line 45: warning: exported type HTTPMethod should have comment or be unexported (golint)
    • Line 60: warning: exported type HTTPMethodOpts should have comment or be unexported (golint)
    • Line 71: warning: exported function NewHTTPMethod should have comment or be unexported (golint)
    • Line 126: warning: exported method HTTPMethod.Get should have comment or be unexported (golint)
    • Line 200: warning: exported method HTTPMethod.MethodRetryPolicy should have comment or be unexported (golint)
    • Line 271: warning: exported method HTTPMethodOpts.GetScheme should have comment or be unexported (golint)
    • butler/internal/reloaders/http.go
    • Line 33: warning: exported function NewHTTPReloader should have comment or be unexported (golint)
    • Line 98: warning: exported type HTTPReloader should have comment or be unexported (golint)
    • Line 105: warning: exported type HTTPReloaderOpts should have comment or be unexported (golint)
    • Line 120: warning: exported method HTTPReloaderOpts.GetClient should have comment or be unexported (golint)
    • Line 124: warning: exported method HTTPReloader.Reload should have comment or be unexported (golint)
    • Line 176: warning: exported method HTTPReloader.ReloaderRetryPolicy should have comment or be unexported (golint)
    • Line 191: warning: exported method HTTPReloader.GetMethod should have comment or be unexported (golint)
    • Line 194: warning: exported method HTTPReloader.GetOpts should have comment or be unexported (golint)
    • Line 198: warning: exported method HTTPReloader.SetOpts should have comment or be unexported (golint)
    • Line 203: warning: exported method HTTPReloader.SetCounter should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell93%

Misspell Finds commonly misspelled English words