Skip to content

Commit 016239e

Browse files
authored
Merge pull request #4 from itgram/master
fix: skip functions without body in opaque linter
2 parents af13432 + c41fd4a commit 016239e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

opaque/opaque.go

Lines changed: 5 additions & 0 deletions
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)