Merge pull request #90 from GoASTScanner/experimental

Remove debug print messages
This commit is contained in:
Grant Murphy 2016-11-15 12:40:07 -08:00 committed by GitHub
commit b26f5cf3c6

View file

@ -15,7 +15,6 @@
package rules package rules
import ( import (
"fmt"
"go/ast" "go/ast"
gas "github.com/GoASTScanner/gas/core" gas "github.com/GoASTScanner/gas/core"
@ -29,16 +28,6 @@ type WeakRand struct {
func (w *WeakRand) Match(n ast.Node, c *gas.Context) (*gas.Issue, error) { func (w *WeakRand) Match(n ast.Node, c *gas.Context) (*gas.Issue, error) {
if _, matched := gas.MatchCallByPackage(n, c, w.packagePath, w.funcName); matched { if _, matched := gas.MatchCallByPackage(n, c, w.packagePath, w.funcName); matched {
fmt.Println("Imported:")
for k, v := range c.Imports.Imported {
fmt.Printf("%s => %s\n", k, v)
}
fmt.Println("Aliased:")
for k, v := range c.Imports.Aliased {
fmt.Printf("%s => %s\n", k, v)
}
fmt.Println("----------------------------------------")
return gas.NewIssue(c, n, w.What, w.Severity, w.Confidence), nil return gas.NewIssue(c, n, w.What, w.Severity, w.Confidence), nil
} }