Skip to content

Commit 715d9a3

Browse files
authored
Fix minor typos in parser debug logs (vektra#858)
* Add node name to parser debug logs for accepted nodes * Fix capitalization in parser debug logs for rejected nodes
1 parent 3a3fb6e commit 715d9a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/parse.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ func (nv *NodeVisitor) DeclaredInterfaces() []string {
358358
func (nv *NodeVisitor) add(ctx context.Context, n *ast.TypeSpec) {
359359
log := zerolog.Ctx(ctx)
360360
log.Debug().
361+
Str("node-name", n.Name.Name).
361362
Str("node-type", fmt.Sprintf("%T", n.Type)).
362363
Msg("found node with acceptable type for mocking")
363364
nv.declaredInterfaces = append(nv.declaredInterfaces, n.Name.Name)
@@ -382,7 +383,7 @@ func (nv *NodeVisitor) Visit(node ast.Node) ast.Visitor {
382383
case *ast.InterfaceType, *ast.IndexExpr:
383384
nv.add(nv.ctx, n)
384385
default:
385-
log.Debug().Msg("Found node with unacceptable type for mocking. Rejecting.")
386+
log.Debug().Msg("found node with unacceptable type for mocking. Rejecting.")
386387
}
387388
}
388389
return nv

0 commit comments

Comments
 (0)