Uh oh!
There was an error while loading. Please reload this page.
Add custom structfield linter to check struct field names and tags - #3843
Conversation
3660e2f to
fd07588Comparefd07588 to
e7e528bCompareCodecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #3843 +/- ##
=======================================
Coverage 92.41% 92.42% =======================================
Files 197 197 Lines 14152 14167 +15 =======================================
+ Hits 13079 13094 +15
Misses 884 884 Partials 189 189 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Cool! Thank you, @alexandear!
Just a couple questions, really.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @alexandear!
LGTM.
Merging.
Uh oh!
There was an error while loading. Please reload this page.
This PR renames
jsonfieldnamelinter tostructfieldand extends it to check struct tags.The linter enforces that:
jsonandurlmatch the struct field namejsonandurltags that includeomitemptymust use pointers types, except for slices, maps,json.RawMessage, andany.Example output for the
ListCursorOptionsstruct:go-github/github/github.go
Lines 262 to 267 in 671b8b0
Closes#3775