-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Errors can be declared globally and route per route #150
Conversation
Per @ccoVeille suggestions why not just add: https://golangci-lint.run/usage/linters/#usestdlibvars to our golangci-lint config? |
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.
Small things. Feel free to disregard.
This is an awesome feature and the interface seems to feel natural
I'm afraid usestdlibvars won't detect this. https://golangci-lint.run/usage/linters/#usestdlibvars Also, there is way to configure it yet to tell him this int in this method is an http.Status But, adding the linter is indeed a great thing. |
Thank you again @ccoVeille and @dylanhitt for your very valuable comments. I resolved all you comments and I'll merge this PR. Let's ship v0.14 now ! 🔥 |
Oh I see, it only works in the context of the stdlib. It's actually already enabled for this project btw. |
Exactly, it would have been reported otherwise. One way to detect them in the context of the methods this project use is to set up forbiddigo rules. It would work |
Fixes #127
Please see the golden file for OpenAPI changes :)