-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add custom jsonfieldname linter to ensure Go field name matches JSON tag name #3757
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
Conversation
…tag name Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3757 +/- ##
=======================================
Coverage 91.50% 91.50%
=======================================
Files 190 190
Lines 17007 17007
=======================================
Hits 15562 15562
Misses 1257 1257
Partials 188 188 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
@stevehipwell - @alexandear - @zyfy29 - might you have time for a code review? Thank you! |
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Thank you, @alexandear! I believe I've addressed your feedback. |
Note that there are many Go field names that do not match the JSON tag names, but changing them all would be a massive breaking API change that is probably unnecessary, and can instead be addressed on a one-by-one basis.
Additionally, one JSON tag had a typo which I've fixed in this PR.