code: func NewLinter(name string, config LinterConfig) (*Linter, error) {
  	if p, ok := predefinedPatterns[config.Pattern]; ok {
  		config.Pattern = p
  	}
  	regex, err := regexp.Compile("(?m:" + config.Pattern + ")")
  	if err != nil {
  		return nil, err
  	}
  	if config.PartitionStrategy == nil {
  		config.PartitionStrategy = partitionPathsAsDirectories
  	}
  	return &Linter{
  		LinterConfig: config,
  		Name:         name,
  		regex:        regex,
  	}, nil
  }
docs: // NewLinter returns a new linter from a config