-
Notifications
You must be signed in to change notification settings - Fork 7
fix: ignore fields of json:"-" #39
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
Please can you add a test case for the |
Sure, added! |
//nolint:cyclop | ||
func extractTagInfo(tag *ast.BasicLit) FieldTagInfo { |
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.
pkg/analysis/helpers/extractjsontags/analyzer.go:84:1: calculated cyclomatic complexity for function extractTagInfo is 12, max is 10 (cyclop)
func extractTagInfo(tag *ast.BasicLit) FieldTagInfo {
I've got a linter error for extractTagInfo
. Can I add nolint for this func? I don't have a good idea to split this func.
Something appears to have gone wrong with the linting here 🤔 Do you have time to investigate? I'm on PTO today |
Enjoy your time off! The error seems to be due to Go 1.24.0 release. And the support of Go 1.24.x for golangci-lint is still WIP: golangci/golangci-lint#5225 |
The support of Go 1.24 is not WIP since v1.64.0, I just left the issue open to catch feedback. |
Ahh, sorry! I missed it. Thank you so much for information. |
https://pkg.go.dev/encoding/json#Marshal
json:"-"
fields in extractjsontags helper and commentstart analyzerjson:"-,"