blob: 9266d9895de3bdfdb2da40d1844f47724689b935 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package commentmap
import (
"reflect"
"github.com/gostaticanalysis/comment"
"golang.org/x/tools/go/analysis"
)
var Analyzer = &analysis.Analyzer{
Name: "commentmap",
Doc: "create comment map",
Run: run,
RunDespiteErrors: true,
ResultType: reflect.TypeOf(comment.Maps{}),
}
func run(pass *analysis.Pass) (interface{}, error) {
return comment.New(pass.Fset, pass.Files), nil
}
|