func (ab *Builder) AddPostValidationRule(name string, fn RuleFunc) *Builder {
	ab.postValidationRules = append(ab.postValidationRules, Rule{name, fn})
	return ab
}
AddPostValidationRule adds a new rule to the analyzer after standard validation rules.
package analyzer
import (
	"os"
	opentracing "github.com/opentracing/opentracing-go"
	"github.com/sirupsen/logrus"
	"github.com/src-d/go-mysql-server/sql"
	"gopkg.in/src-d/go-errors.v1"
)
const debugAnalyzerKey = "DEBUG_ANALYZER"
const maxAnalysisIterations = 1000
var ErrMaxAnalysisIters = errors.NewKind("exceeded max analysis iterations (%d)")
type Builder struct {
	preAnalyzeRules     []Rule
	postAnalyzeRules    []Rule
	preValidationRules  []Rule
	postValidationRules []Rule
	catalog             *sql.Catalog
	debug               bool
	parallelism         int
}
func NewBuilder(c *sql.Catalog) *Builder {
	return &Builder{catalog: c}
}
func (ab *Builder) WithDebug() *Builder {
	ab.debug = true
	return ab
}
func (ab *Builder) WithParallelism(parallelism int) *Builder {
	ab.parallelism = parallelism
	return ab
}
func (ab *Builder) AddPreAnalyzeRule(name string, fn RuleFunc) *Builder {
	ab.preAnalyzeRules = append(ab.preAnalyzeRules, Rule{name, fn})
	return ab
}
func (ab *Builder) AddPostAnalyzeRule(name string, fn RuleFunc) *Builder {
	ab.postAnalyzeRules = append(ab.postAnalyzeRules, Rule{name, fn})
	return ab
}
func (ab *Builder) AddPreValidationRule(name string, fn RuleFunc) *Builder {
	ab.preValidationRules = append(ab.preValidationRules, Rule{name, fn})
	return ab
}