-
Notifications
You must be signed in to change notification settings - Fork 59
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
linter: null safety for functions, methods and properties for classes #1245
base: master
Are you sure you want to change the base?
Conversation
7f516ba
to
a4e513d
Compare
2972b37
to
88b0bb0
Compare
src/meta/metainfo.go
Outdated
@@ -129,6 +129,7 @@ type FuncInfo struct { | |||
Flags FuncFlags | |||
ExitFlags int // if function has exit/die/throw, then ExitFlags will be <> 0 | |||
Internal bool | |||
IsVariadic bool |
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.
I would combine this with Flags
. It already has information about IsDeprecated
, IsPure
.
Or create separate flags for the types.
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.
Make sense
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.
Done
return isNullable | ||
} | ||
|
||
func IsTypeMixed(typ Map) bool { |
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.
why not just type.Contains("mixed")
? in this case, you're looking at []mixed
simply as mixed
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.
You are right. I missed this
return fn.Params[paramIndex] | ||
} | ||
|
||
func formatSlashesFuncName(fn meta.FuncInfo) string { |
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.
why? You've broken the FQN
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.
Why? This is only used in the error message output.
No description provided.