Skip to content

Fix incorrect pointer inputs to json.Unmarshal#3434

Merged
thaJeztah merged 1 commit intodocker:masterfrom
howardjohn:json/unmarshal-pointer
Feb 25, 2022
Merged

Fix incorrect pointer inputs to json.Unmarshal#3434
thaJeztah merged 1 commit intodocker:masterfrom
howardjohn:json/unmarshal-pointer

Conversation

@howardjohn
Copy link
Copy Markdown
Contributor

@thaJeztah
Copy link
Copy Markdown
Member

Oh, nice find!!

I see you have that checker; do you know if there's any (existing) linter that would detect these? We currently use golangci-lint (although not with all linters enabled); would be great if these could be caught in CI.

Are you planning to contribute your checker as a linter and/or as addition to an existing linter?

@thaJeztah thaJeztah added this to the 21.xx milestone Feb 25, 2022
@thaJeztah thaJeztah merged commit df7adf4 into docker:master Feb 25, 2022
@howardjohn
Copy link
Copy Markdown
Contributor Author

@thaJeztah I have been in touch with some more knowledgeable Golang folks at my company and they have a plan to implement a linter but I don't think its a top priority. I tried myself but ran into trouble since it can be tricky when a method gets an interface{} type, for example - we lose a lot of the cases where it can happen which is why I did the runtime checker.

@thaJeztah
Copy link
Copy Markdown
Member

oh! I see I never replied to you ☺️ 😓. Thanks for the extra info, and no worries; if it would ever see the light as a linter; let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants