Skip to content

Commit 4bdd24f

Browse files
committed
fix: remove unreachable case clause in walkDeps
Remove the unreachable *goaexpr.ResultTypeExpr case since ResultTypeExpr implements UserType interface and is already handled by the goaexpr.UserType case. This fixes the static analysis warning SA4020.
1 parent 44d190c commit 4bdd24f

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

docs/generate.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,6 @@ func walkDeps(att *goaexpr.AttributeExpr, add func(goaexpr.UserType)) {
235235
for _, nat := range *t {
236236
walkDeps(nat.Attribute, add)
237237
}
238-
case *goaexpr.ResultTypeExpr:
239-
add(t)
240-
walkDeps(t.AttributeExpr, add)
241238
case *goaexpr.Union:
242239
for _, v := range t.Values {
243240
walkDeps(v.Attribute, add)

0 commit comments

Comments
 (0)