Skip to content

Commit

Permalink
Skip empty comments in checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krivak committed Sep 26, 2020
1 parent 14587b5 commit cd7205a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions godot.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,15 @@ func getComments(file *ast.File, fset *token.FileSet, all bool) []*ast.CommentGr
for _, decl := range file.Decls {
switch d := decl.(type) {
case *ast.GenDecl:
if d.Doc != nil {
comments = append(comments, d.Doc)
}
case *ast.FuncDecl:
if d.Doc != nil {
comments = append(comments, d.Doc)
}
}
}
return comments
}

Expand Down

0 comments on commit cd7205a

Please sign in to comment.