code: func NewAnalyzer(conf Config, tests bool, logger *log.Logger) *Analyzer {
  	ignoreNoSec := false
  	if enabled, err := conf.IsGlobalEnabled(Nosec); err == nil {
  		ignoreNoSec = enabled
  	}
  	if logger == nil {
  		logger = log.New(os.Stderr, "[gosec]", log.LstdFlags)
  	}
  	return &Analyzer{
  		ignoreNosec: ignoreNoSec,
  		ruleset:     make(RuleSet),
  		context:     &Context{},
  		config:      conf,
  		logger:      logger,
  		issues:      make([]*Issue, 0, 16),
  		stats:       &Metrics{},
  		errors:      make(map[string][]Error),
  		tests:       tests,
  	}
  }
docs: // NewAnalyzer builds a new analyzer.