-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Added go-mnd linter #842
Added go-mnd linter #842
Conversation
Build failed due to un-related reason, other PR failed for the same reason. |
@sayboras The build is failing due to not regenerating the |
@tpounds it's failing even after updating Readme.md :( |
Looks like it's failing for an unrelated issue due to a change with the https://travis-ci.com/golangci/golangci-lint/jobs/253051370#L1258 I think it was introduced in by commit df27992. @jirfag Any thoughts? |
227763f
to
a25c30d
Compare
@tpounds the build is passed now, need your help to review |
@@ -37,6 +37,7 @@ require ( | |||
github.com/spf13/viper v1.4.0 | |||
github.com/stretchr/testify v1.4.0 | |||
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e | |||
github.com/tommy-muehle/go-mnd v0.0.0-20190903201840-c93e405da530 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this to reference a tagged release version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried before, but it gives me the below error (even the tag is available)
go: github.com/tommy-muehle/go-mnd@v1.1.1: reading github.com/tommy-muehle/go-mnd/go.mod at revision v1.1.1: unknown revision v1.1.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I got it now, the tag in github.com/tommy-muehle/go-mnd is not prefixed with v
, so we can only use pseudo-versions only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raised one issue here tommy-muehle/go-mnd#1
a25c30d
to
c4c0a9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you,
please fix load mode and I'm ready to merge it
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
Add test cases
b118af4
to
98d1b1f
Compare
@jirfag @tpounds @bombsimon Addressed all comments, please let me know if i miss anything |
I'm not a collaborator but since you asked and since I commented your PR, lgtm. 🚢 |
Thanks for your time reviewing anyway 💯 |
package golinters | ||
|
||
import ( | ||
magic_numbers "github.com/tommy-muehle/go-mnd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I would just alias this as mnd
.
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis" | ||
) | ||
|
||
func NewGomnd() *goanalysis.Linter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Similarly, I would name this NewGoMND
to be consistent with standard Go naming conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sayboras 🚢 it. Feel free to address nitpicks in a separate pr.
Fixes #441
Please make sure you didn't directly change
README.md
: it should be changed only by changingREADME.tmpl.md
and runningmake README.md
.