Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Megacheck has been deprecated. Please use staticcheck instead. #430

Closed
bkmoovio opened this issue Jan 8, 2019 · 2 comments
Closed

Megacheck has been deprecated. Please use staticcheck instead. #430

bkmoovio opened this issue Jan 8, 2019 · 2 comments
Assignees

Comments

@bkmoovio
Copy link
Contributor

bkmoovio commented Jan 8, 2019

What were you trying to do?

Creating a test for: #429

Added a new same day ach test to moov-io/ach/test, and pushed to github

What did you expect to see?

megacheck return without error

What did you see?

Megacheck has been deprecated. Please use staticcheck instead.
file.go:308:9: assigning the result of this type assertion to a variable (switch batch := batch.(type)) could eliminate the following type assertions:
/home/travis/gopath/src/github.com/moov-io/ach/file.go:310:59 (S1034)
server/repository.go:34:34: should use make(map[string]*ach.File) instead (S1019)
The command "megacheck ./..." exited with 1.

How can we reproduce the problem?

push a moov-io/ach change and let the build run.

@bkmoovio
Copy link
Contributor Author

bkmoovio commented Jan 8, 2019

Draft Proposal:

Breaking Change

Instead of using make(map[string])*ach.File) -- as suggested from staticcheck

Change file.NotificationOfChange from type *[]BatchCOR to type []Batcher

Modify file.AddBatch Check batch.Category == CategoryNOC instead of the type assertion.

Add mockPPDEntryDetailNOC which creates a PPD NOC Entry Detail (specifically setting entry.Category = CategoryNOC

Modify file_test.testFileNotificationOfChange to use mockPPDEntryDetailNOC

Update .travis.yml
Remove:

  • go get -u honnef.co/go/tools/cmd/megacheck
    megacheck ./...
    Add:
  • go get -u honnef.co/go/tools/staticcheck
    staticcheck ./...

@bkmoovio bkmoovio self-assigned this Jan 8, 2019
@adamdecaf
Copy link
Member

adamdecaf commented Jan 8, 2019

FYI, the daily cron to rebuild/test must have broken in the travis-ci org -> com move. I had those setup to catch these trivial errors that break the build. I fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants