Skip to content

Commit c41fd4a

Browse files
committed
fix: skip functions without body in opaque linter
1 parent af13432 commit c41fd4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

opaque/opaque.go

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ func (r *runner) run(pass *analysis.Pass) (interface{}, error) {
5353
return
5454
}
5555

56+
if funcDecl.Body == nil {
57+
// skip functions without body
58+
return
59+
}
60+
5661
if funcDecl.Type.Results == nil {
5762
// skip functions without return values
5863
return

0 commit comments

Comments
 (0)