Preparing report...

Report for github.com/moov-io/achgateway

A+    Excellent!    Found 64 issues across 113 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.


golint43%

Golint is a linter for Go source code.

    • achgateway/internal/events/service.go
    • Line 28: warning: exported type Emitter should have comment or be unexported (golint)
    • Line 32: warning: exported function NewEmitter should have comment or be unexported (golint)
    • Line 47: warning: exported type MockEmitter should have comment or be unexported (golint)
    • Line 49: warning: exported method MockEmitter.Send should have comment or be unexported (golint)
    • achgateway/internal/notify/multi.go
    • Line 27: warning: exported function NewMultiSender should have comment or be unexported (golint)
    • Line 84: warning: exported method MultiSender.Info should have comment or be unexported (golint)
    • Line 100: warning: exported method MultiSender.Critical should have comment or be unexported (golint)
    • achgateway/internal/upload/filename_template.go
    • Line 17: warning: exported type FilenameData should have comment or be unexported (golint)
    • Line 33: warning: exported function RenderACHFilename should have comment or be unexported (golint)
    • Line 55: warning: comment on exported function ACHFilenameSeq should be of the form "ACHFilenameSeq ..." (golint)
    • achgateway/internal/transform/gpg.go
    • Line 23: warning: exported type GPGEncryption should have comment or be unexported (golint)
    • Line 28: warning: exported function NewGPGEncryptor should have comment or be unexported (golint)
    • Line 77: warning: exported method GPGEncryption.Transform should have comment or be unexported (golint)
    • achgateway/internal/incoming/odfi/processor.go
    • Line 40: warning: exported type File should have comment or be unexported (golint)
    • Line 45: warning: exported type FileProcessor should have comment or be unexported (golint)
    • Line 52: warning: exported type Processors should have comment or be unexported (golint)
    • Line 54: warning: exported function SetupProcessors should have comment or be unexported (golint)
    • Line 65: warning: exported method Processors.HandleAll should have comment or be unexported (golint)
    • Line 81: warning: exported function ProcessFiles should have comment or be unexported (golint)
    • achgateway/internal/upload/mock_agent.go
    • Line 13: warning: exported type MockAgent should have comment or be unexported (golint)
    • Line 24: warning: exported method MockAgent.ID should have comment or be unexported (golint)
    • Line 28: warning: exported method MockAgent.GetInboundFiles should have comment or be unexported (golint)
    • Line 35: warning: exported method MockAgent.GetReconciliationFiles should have comment or be unexported (golint)
    • Line 42: warning: exported method MockAgent.GetReturnFiles should have comment or be unexported (golint)
    • Line 49: warning: exported method MockAgent.UploadFile should have comment or be unexported (golint)
    • Line 60: warning: exported method MockAgent.Delete should have comment or be unexported (golint)
    • Line 68: warning: exported method MockAgent.InboundPath should have comment or be unexported (golint)
    • Line 72: warning: exported method MockAgent.OutboundPath should have comment or be unexported (golint)
    • Line 76: warning: exported method MockAgent.ReconciliationPath should have comment or be unexported (golint)
    • Line 80: warning: exported method MockAgent.ReturnPath should have comment or be unexported (golint)
    • Line 84: warning: exported method MockAgent.Hostname should have comment or be unexported (golint)
    • Line 88: warning: exported method MockAgent.Ping should have comment or be unexported (golint)
    • Line 92: warning: exported method MockAgent.Close should have comment or be unexported (golint)
    • achgateway/internal/upload/sftp.go
    • Line 37: warning: exported type SFTPTransferAgent should have comment or be unexported (golint)
    • Line 61: warning: exported method SFTPTransferAgent.ID should have comment or be unexported (golint)
    • Line 78: 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 193: warning: exported method SFTPTransferAgent.Ping should have comment or be unexported (golint)
    • Line 226: warning: exported method SFTPTransferAgent.Close should have comment or be unexported (golint)
    • Line 239: warning: exported method SFTPTransferAgent.InboundPath should have comment or be unexported (golint)
    • Line 243: warning: exported method SFTPTransferAgent.OutboundPath should have comment or be unexported (golint)
    • Line 247: warning: exported method SFTPTransferAgent.ReconciliationPath should have comment or be unexported (golint)
    • Line 251: warning: exported method SFTPTransferAgent.ReturnPath should have comment or be unexported (golint)
    • Line 255: warning: exported method SFTPTransferAgent.Hostname should have comment or be unexported (golint)
    • Line 262: warning: exported method SFTPTransferAgent.Delete should have comment or be unexported (golint)
    • Line 283: warning: comment on exported method SFTPTransferAgent.UploadFile should be of the form "UploadFile ..." (golint)
    • Line 324: warning: exported method SFTPTransferAgent.GetInboundFiles should have comment or be unexported (golint)
    • Line 328: warning: exported method SFTPTransferAgent.GetReconciliationFiles should have comment or be unexported (golint)
    • Line 332: warning: exported method SFTPTransferAgent.GetReturnFiles should have comment or be unexported (golint)
    • Line 376: 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)
    • achgateway/internal/upload/agent.go
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 87: warning: exported type CreatedAgents should have comment or be unexported (golint)
    • Line 93: warning: exported function RegisterAdminServer should have comment or be unexported (golint)
    • achgateway/internal/consul/wrapper.go
    • Line 27: warning: exported type Wrapper should have comment or be unexported (golint)
    • Line 36: warning: exported function NewWrapper should have comment or be unexported (golint)
    • Line 46: warning: exported method Wrapper.Acquire should have comment or be unexported (golint)
    • Line 80: warning: exported method Wrapper.Shutdown should have comment or be unexported (golint)
    • achgateway/internal/service/model_sharding.go
    • Line 38: warning: exported type Sharding should have comment or be unexported (golint)
    • Line 44: warning: exported method Sharding.Find should have comment or be unexported (golint)
    • Line 53: warning: exported method Sharding.Validate should have comment or be unexported (golint)
    • Line 62: warning: exported type Shard should have comment or be unexported (golint)
    • Line 73: warning: exported method Shard.Validate should have comment or be unexported (golint)
    • Line 98: warning: exported type Cutoffs should have comment or be unexported (golint)
    • Line 103: warning: exported method Cutoffs.Location should have comment or be unexported (golint)
    • Line 111: warning: exported method Cutoffs.Validate should have comment or be unexported (golint)
    • Line 121: warning: exported type PreUpload should have comment or be unexported (golint)
    • Line 125: warning: exported method PreUpload.Validate should have comment or be unexported (golint)
    • Line 135: warning: exported type Output should have comment or be unexported (golint)
    • Line 139: warning: exported method Output.Validate should have comment or be unexported (golint)
    • Line 143: warning: exported method Shard.FilenameTemplate should have comment or be unexported (golint)
    • achgateway/internal/service/model_inbound.go
    • Line 26: warning: exported type Inbound should have comment or be unexported (golint)
    • Line 33: warning: exported method Inbound.Validate should have comment or be unexported (golint)
    • Line 46: warning: exported type HTTPConfig should have comment or be unexported (golint)
    • Line 50: warning: exported type InMemory should have comment or be unexported (golint)
    • Line 54: warning: exported method InMemory.Validate should have comment or be unexported (golint)
    • Line 61: warning: exported type KafkaConfig should have comment or be unexported (golint)
    • Line 75: warning: exported method KafkaConfig.Validate should have comment or be unexported (golint)
    • Line 88: warning: exported type ODFIFiles should have comment or be unexported (golint)
    • Line 96: warning: exported method ODFIFiles.Validate should have comment or be unexported (golint)
    • Line 115: warning: exported type ODFIProcessors should have comment or be unexported (golint)
    • Line 122: warning: exported method ODFIProcessors.Validate should have comment or be unexported (golint)
    • Line 126: warning: exported type ODFICorrections should have comment or be unexported (golint)
    • Line 130: warning: exported type ODFIReconciliation should have comment or be unexported (golint)
    • Line 135: warning: exported type ODFIPrenotes should have comment or be unexported (golint)
    • Line 139: warning: exported type ODFIReturns should have comment or be unexported (golint)
    • Line 143: warning: exported type ODFIPublishing should have comment or be unexported (golint)
    • Line 147: warning: exported method ODFIPublishing.Validate should have comment or be unexported (golint)
    • Line 157: warning: exported type ODFIStorage should have comment or be unexported (golint)
    • achgateway/internal/notify/email.go
    • Line 25: warning: exported type Email should have comment or be unexported (golint)
    • Line 30: warning: exported type EmailTemplateData should have comment or be unexported (golint)
    • Line 48: warning: exported function NewEmail should have comment or be unexported (golint)
    • Line 96: warning: exported method Email.Info should have comment or be unexported (golint)
    • Line 104: warning: exported method Email.Critical should have comment or be unexported (golint)
    • achgateway/pkg/models/events.go
    • Line 29: warning: exported type Event should have comment or be unexported (golint)
    • Line 34: warning: exported method Event.Bytes should have comment or be unexported (golint)
    • Line 40: warning: exported method Event.MarshalJSON should have comment or be unexported (golint)
    • Line 50: warning: exported function ReadEvent should have comment or be unexported (golint)
    • Line 56: warning: exported type Batch should have comment or be unexported (golint)
    • Line 61: warning: exported type CorrectionFile should have comment or be unexported (golint)
    • Line 67: warning: exported type IncomingFile should have comment or be unexported (golint)
    • Line 72: warning: exported type PrenoteFile should have comment or be unexported (golint)
    • Line 78: warning: exported type ReconciliationFile should have comment or be unexported (golint)
    • Line 84: warning: exported type ReturnFile should have comment or be unexported (golint)
    • Line 90: warning: exported type FileUploaded should have comment or be unexported (golint)
    • achgateway/internal/alerting/alerter.go
    • Line 15: warning: exported type Alerter should have comment or be unexported (golint)
    • Line 19: warning: exported type PagerDuty should have comment or be unexported (golint)
    • Line 24: warning: exported function NewAlerter should have comment or be unexported (golint)
    • Line 35: warning: exported function NewPagerDutyAlerter should have comment or be unexported (golint)
    • Line 46: warning: exported method PagerDuty.AlertError should have comment or be unexported (golint)
    • achgateway/internal/service/model_errors.go
    • Line 25: warning: exported type ErrorAlerting should have comment or be unexported (golint)
    • Line 30: warning: exported method ErrorAlerting.Validate should have comment or be unexported (golint)
    • Line 44: warning: exported type PagerDutyAlerting should have comment or be unexported (golint)
    • Line 52: warning: exported method PagerDutyAlerting.Validate should have comment or be unexported (golint)
    • Line 62: warning: exported type MockAlerting should have comment or be unexported (golint)
    • achgateway/internal/notify/notify.go
    • Line 11: warning: exported type Direction should have comment or be unexported (golint)
    • Line 14: warning: exported const Upload should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Message should have comment or be unexported (golint)
    • Line 25: warning: exported type Sender should have comment or be unexported (golint)
    • achgateway/internal/pipeline/merging.go
    • Line 55: warning: exported function NewMerging should have comment or be unexported (golint)
    • Line 115: 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)
    • achgateway/internal/pipeline/mock_xfer_merging.go
    • Line 26: warning: exported type MockXferMerging should have comment or be unexported (golint)
    • Line 34: warning: exported method MockXferMerging.HandleXfer should have comment or be unexported (golint)
    • Line 39: warning: exported method MockXferMerging.HandleCancel should have comment or be unexported (golint)
    • Line 44: warning: exported method MockXferMerging.WithEachMerged should have comment or be unexported (golint)
    • achgateway/internal/service/model_events.go
    • Line 24: warning: exported type EventsConfig should have comment or be unexported (golint)
    • Line 29: warning: exported method EventsConfig.Validate should have comment or be unexported (golint)
    • Line 42: warning: exported type EventsStream should have comment or be unexported (golint)
    • Line 46: warning: exported method EventsStream.Validate should have comment or be unexported (golint)
    • Line 56: warning: exported type WebhookConfig should have comment or be unexported (golint)
    • Line 60: warning: exported method WebhookConfig.Validate should have comment or be unexported (golint)
    • achgateway/internal/shards/mock_repository.go
    • Line 24: warning: exported type MockRepository should have comment or be unexported (golint)
    • Line 28: warning: exported function NewMockRepository should have comment or be unexported (golint)
    • Line 34: warning: exported method MockRepository.Lookup should have comment or be unexported (golint)
    • achgateway/internal/service/model_audit.go
    • Line 28: warning: exported type AuditTrails should have comment or be unexported (golint)
    • Line 30: warning: exported method AuditTrails.Validate should have comment or be unexported (golint)
    • Line 39: warning: exported type AuditTrail should have comment or be unexported (golint)
    • Line 45: warning: exported method AuditTrail.Validate should have comment or be unexported (golint)
    • Line 55: warning: exported type GPG should have comment or be unexported (golint)
    • Line 60: warning: exported type Signer should have comment or be unexported (golint)
    • Line 65: warning: exported method Signer.Password should have comment or be unexported (golint)
    • achgateway/internal/upload/ftp.go
    • Line 60: warning: exported method FTPTransferAgent.ID should have comment or be unexported (golint)
    • Line 78: 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 133: warning: exported method FTPTransferAgent.Ping should have comment or be unexported (golint)
    • Line 163: warning: exported method FTPTransferAgent.Close should have comment or be unexported (golint)
    • Line 178: warning: exported method FTPTransferAgent.InboundPath should have comment or be unexported (golint)
    • Line 182: warning: exported method FTPTransferAgent.OutboundPath should have comment or be unexported (golint)
    • Line 186: warning: exported method FTPTransferAgent.ReconciliationPath should have comment or be unexported (golint)
    • Line 190: warning: exported method FTPTransferAgent.ReturnPath should have comment or be unexported (golint)
    • Line 194: warning: exported method FTPTransferAgent.Hostname should have comment or be unexported (golint)
    • Line 201: warning: exported method FTPTransferAgent.Delete should have comment or be unexported (golint)
    • Line 221: warning: comment on exported method FTPTransferAgent.UploadFile should be of the form "UploadFile ..." (golint)
    • Line 255: warning: exported method FTPTransferAgent.GetInboundFiles should have comment or be unexported (golint)
    • Line 259: warning: exported method FTPTransferAgent.GetReconciliationFiles should have comment or be unexported (golint)
    • Line 263: warning: exported method FTPTransferAgent.GetReturnFiles should have comment or be unexported (golint)
    • achgateway/internal/gpgx/keys.go
    • Line 50: warning: exported function Encrypt should have comment or be unexported (golint)
    • Line 95: warning: exported function Sign should have comment or be unexported (golint)
    • Line 108: warning: exported function Decrypt should have comment or be unexported (golint)
    • achgateway/internal/incoming/web/api_files.go
    • Line 36: warning: exported function NewFilesController should have comment or be unexported (golint)
    • Line 43: warning: exported type FilesController should have comment or be unexported (golint)
    • Line 48: warning: exported method FilesController.AppendRoutes should have comment or be unexported (golint)
    • Line 58: warning: exported method FilesController.CreateFileHandler should have comment or be unexported (golint)
    • achgateway/internal/notify/pagerduty.go
    • Line 16: warning: exported type PagerDuty should have comment or be unexported (golint)
    • Line 22: warning: exported function NewPagerDuty should have comment or be unexported (golint)
    • Line 34: warning: exported method PagerDuty.Ping should have comment or be unexported (golint)
    • Line 51: warning: exported method PagerDuty.Info should have comment or be unexported (golint)
    • Line 56: warning: exported method PagerDuty.Critical should have comment or be unexported (golint)
    • achgateway/internal/incoming/odfi/mock_scheduler.go
    • Line 24: warning: exported type MockScheduler should have comment or be unexported (golint)
    • Line 28: warning: exported method MockScheduler.Start should have comment or be unexported (golint)
    • Line 32: warning: exported method MockScheduler.Shutdown should have comment or be unexported (golint)
    • Line 34: warning: exported method MockScheduler.RegisterRoutes should have comment or be unexported (golint)
    • achgateway/internal/service/model_notifications.go
    • Line 28: warning: exported var DefaultEmailTemplate should have comment or be unexported (golint)
    • Line 39: warning: exported type Notifications should have comment or be unexported (golint)
    • Line 46: warning: exported type NotificationRetries should have comment or be unexported (golint)
    • Line 51: warning: exported method Notifications.FindEmails should have comment or be unexported (golint)
    • Line 63: warning: exported method Notifications.FindPagerDutys should have comment or be unexported (golint)
    • Line 75: warning: exported method Notifications.FindSlacks should have comment or be unexported (golint)
    • Line 87: warning: exported method Notifications.Validate should have comment or be unexported (golint)
    • Line 107: warning: exported type Email should have comment or be unexported (golint)
    • Line 125: warning: exported method Email.Tmpl should have comment or be unexported (golint)
    • Line 132: warning: exported type PagerDuty should have comment or be unexported (golint)
    • Line 139: warning: exported method PagerDuty.Validate should have comment or be unexported (golint)
    • Line 149: warning: exported type Slack should have comment or be unexported (golint)
    • Line 155: warning: exported method Slack.Validate should have comment or be unexported (golint)
    • achgateway/internal/service/model_upload.go
    • Line 29: warning: exported type UploadAgents should have comment or be unexported (golint)
    • Line 36: warning: exported method UploadAgents.Find should have comment or be unexported (golint)
    • Line 45: warning: exported method UploadAgents.Validate should have comment or be unexported (golint)
    • Line 52: warning: exported type UploadAgent should have comment or be unexported (golint)
    • Line 66: warning: exported method UploadAgent.SplitAllowedIPs should have comment or be unexported (golint)
    • Line 73: warning: exported type FTP should have comment or be unexported (golint)
    • Line 83: warning: exported method FTP.CAFile should have comment or be unexported (golint)
    • Line 90: warning: exported method FTP.Timeout should have comment or be unexported (golint)
    • Line 97: warning: exported method FTP.DisableEPSV should have comment or be unexported (golint)
    • Line 112: warning: exported type SFTP should have comment or be unexported (golint)
    • Line 125: warning: exported method SFTP.Timeout should have comment or be unexported (golint)
    • Line 132: warning: exported method SFTP.MaxConnections should have comment or be unexported (golint)
    • Line 139: warning: exported method SFTP.PacketSize should have comment or be unexported (golint)
    • Line 156: warning: exported type MockAgent should have comment or be unexported (golint)
    • Line 158: warning: exported type UploadPaths should have comment or be unexported (golint)
    • Line 165: warning: exported type UploadNotifiers should have comment or be unexported (golint)
    • Line 171: warning: exported type Merging should have comment or be unexported (golint)
    • Line 176: warning: exported type FlattenBatches should have comment or be unexported (golint)
    • Line 178: warning: exported type UploadRetry should have comment or be unexported (golint)
    • Line 183: warning: exported method UploadRetry.Validate should have comment or be unexported (golint)
    • achgateway/internal/notify/slack.go
    • Line 19: warning: exported type Slack should have comment or be unexported (golint)
    • Line 24: warning: exported function NewSlack should have comment or be unexported (golint)
    • Line 43: warning: exported method Slack.Info should have comment or be unexported (golint)
    • Line 48: warning: exported method Slack.Critical should have comment or be unexported (golint)
    • achgateway/internal/incoming/odfi/scheduler.go
    • Line 32: warning: exported type Scheduler should have comment or be unexported (golint)
    • Line 38: warning: exported type PeriodicScheduler should have comment or be unexported (golint)
    • Line 53: warning: exported function NewPeriodicScheduler should have comment or be unexported (golint)
    • Line 79: warning: exported method PeriodicScheduler.Shutdown should have comment or be unexported (golint)
    • Line 87: warning: exported method PeriodicScheduler.Start should have comment or be unexported (golint)
    • achgateway/internal/audittrail/storage_mock.go
    • Line 15: warning: exported type MockStorage should have comment or be unexported (golint)
    • Line 28: warning: exported method MockStorage.Close should have comment or be unexported (golint)
    • Line 32: warning: exported method MockStorage.SaveFile should have comment or be unexported (golint)
    • Line 41: warning: exported method MockStorage.GetFile should have comment or be unexported (golint)
    • achgateway/internal/notify/mock_sender.go
    • Line 3: warning: exported type MockSender should have comment or be unexported (golint)
    • Line 10: warning: exported method MockSender.Info should have comment or be unexported (golint)
    • Line 16: warning: exported method MockSender.Critical should have comment or be unexported (golint)
    • Line 22: warning: exported method MockSender.InfoWasCalled should have comment or be unexported (golint)
    • Line 26: warning: exported method MockSender.CriticalWasCalled should have comment or be unexported (golint)
    • Line 30: warning: exported method MockSender.CapturedMessage should have comment or be unexported (golint)
    • achgateway/internal/upload/retry.go
    • Line 20: warning: exported type RetryAgent should have comment or be unexported (golint)
    • Line 35: warning: exported method RetryAgent.ID should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method RetryAgent.GetInboundFiles should be of the form "GetInboundFiles ..." (golint)
    • Line 85: warning: exported method RetryAgent.GetReconciliationFiles should have comment or be unexported (golint)
    • Line 89: warning: exported method RetryAgent.GetReturnFiles should have comment or be unexported (golint)
    • Line 93: warning: exported method RetryAgent.UploadFile should have comment or be unexported (golint)
    • Line 104: warning: exported method RetryAgent.Delete should have comment or be unexported (golint)
    • Line 115: warning: comment on exported method RetryAgent.InboundPath should be of the form "InboundPath ..." (golint)
    • Line 120: warning: exported method RetryAgent.OutboundPath should have comment or be unexported (golint)
    • Line 124: warning: exported method RetryAgent.ReconciliationPath should have comment or be unexported (golint)
    • Line 128: warning: exported method RetryAgent.ReturnPath should have comment or be unexported (golint)
    • Line 132: warning: exported method RetryAgent.Hostname should have comment or be unexported (golint)
    • Line 138: warning: exported method RetryAgent.Ping should have comment or be unexported (golint)
    • Line 142: warning: exported method RetryAgent.Close should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


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!