skeleton creates skeleton codes for a modularized static analysis tool with x/tools/go/analysis package.
x/tools/go/analysis package provides a type analysis.Analyzer
which is unit of analyzers in modularized static analysis tool.
If you want to create new analyzer, you should provide a package variable which type is *analysis.Analyzer
.
skeleton
creates skeleton codes of the package and directories including test codes and main.go.
$ go get -u github.com/gostaticanalysis/skeleton
$ skeleton pkgname
pkgname
├── cmd
│ └── pkgname
│ └── main.go
├── pkgname.go
├── pkgname_test.go
└── testdata
└── src
└── a
└── a.go
$ skeleton -path="github.com/gostaticanalysis/pkgname"
pkgname
├── pkgname.go
├── pkgname_test.go
└── testdata
└── src
└── a
└── a.go
$ skeleton -cmd=false pkgname
pkgname
├── pkgname.go
├── pkgname_test.go
└── testdata
└── src
└── a
└── a.go