package
0.0.0-20220729082848-6059b0e2926c
Repository: https://github.com/sharefull/refactortools.git
Documentation: pkg.go.dev
# README
sharefull/refactortools/gormcheck
gormcheck
finds code which may be SQL injection.
Install
You can get gormcheck
by go install
command (Go 1.16 and higher).
$ go install github.com/sharefull/refactortools/gormcheck/cmd/gormcheck@latest
How to use
gormcheck
run with go vet
as below when Go is 1.12 and higher.
$ go vet -vettool=$(which gormcheck) ./...
Analyze with golang.org/x/tools/go/analysis
You can use gormcheck.Analyzers with unitchecker.
package main
import (
"github.com/sharefull/refactortools/gormcheck"
"golang.org/x/tools/go/analysis/unitchecker"
)
func main() { unitchecker.Main(gormcheck.Analyzers...) }
The gormcheck provides following analyzers.
# Variables
Analyzers is a list of analyzers in gormcheck.