-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
enhancementNew feature or improvementNew feature or improvementlinter: newSupport new linterSupport new linterno decisionNo decision to fix or notNo decision to fix or not
Description
Your feature request related to a problem? Please describe.
The untypedconst
linter ensures that untyped constant expressions are not used as values of defined type (a.k.a. named type).
// The first call is valid as it is passing a typed-constant to "takesExString" which expects a typed-constant as its first parameter.
// The second call is invalid as it passes an untyped-constant which has the same underlying type as the one expected (string)
func Call() {
takesExString(external.ExStr)
takesExString("hoge") // want `passing untyped constant to parameter of defined type "github.com/jiftechnify/untypedconst/pkg/external.ExString"`
[..]
https://github.com/jiftechnify/untypedconst
Describe the solution you'd like.
—
Describe alternatives you've considered.
—
Additional context.
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or improvementNew feature or improvementlinter: newSupport new linterSupport new linterno decisionNo decision to fix or notNo decision to fix or not