// Ignore removes files from the workspace based on the contents of the
// .s2iignore file
173812
func (b *DockerIgnorer) Ignore(config *api.Config) error {
	/*
		 so, to duplicate the .dockerignore capabilities (https://docs.docker.com/reference/builder/#dockerignore-file)
		 we have a flow that follows:
		0) First note, .dockerignore rules are NOT recursive (unlike .gitignore) .. you have to list subdir explicitly
		1) Read in the exclusion patterns
		2) Skip over comments (noted by #)
		3) note overrides (via exclamation sign i.e. !) and reinstate files (don't remove) as needed
		4) leverage Glob matching to build list, as .dockerignore is documented as following filepath.Match / filepath.Glob
		5) del files
		 1 to 4 is in getListOfFilesToIgnore
	*/
	filesToDel, lerr := getListOfFilesToIgnore(config.WorkingSourceDir)
	if lerr != nil {
		return lerr
	}

	if filesToDel == nil {
		return nil
	}

	// delete compiled list of files
	for _, fileToDel := range filesToDel {
		glog.V(5).Infof("attempting to remove file %s \n", fileToDel)
		rerr := os.RemoveAll(fileToDel)
		if rerr != nil {
			glog.Errorf("error removing file %s because of %v \n", fileToDel, rerr)
			return rerr
		}
	}

	return nil
}
146856
func LoadScanProofsIgnore(filepath string) ([]string, error) {
	f, err := os.Open(filepath)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	scanner := bufio.NewScanner(f)
	scanner.Split(bufio.ScanLines)
	var ignored []string
	for scanner.Scan() {
		x := strings.TrimSpace(scanner.Text())
		if strings.HasPrefix(x, "//") {
			continue
		}
		ignored = append(ignored, x)
	}
	return ignored, nil
}
1127655
func IgnoreIPs(ips []net.IP) func(*Server) error {
	return func(s *Server) error {
		s.ignoreIPs = ips
		return nil
	}
}
147550
func (api *ArchiveAPI) Exclude(key string) *ArchiveAPI {
	api.exclude(key)
	return api
}
561829
func (c *criClient) IgnoreRunningWorkloads() {
	if c == nil {
		return
	}

	req := &criRuntime.ListPodSandboxRequest{}

	resp, err := c.RuntimeServiceClient.ListPodSandbox(context.Background(), req)
	if err != nil {
		log.WithError(err).Error("unable to get list of pods running")
		return
	}
	for _, pod := range resp.GetItems() {
		scopedLog := log.WithField(logfields.ContainerID, pod.GetId())
		scopedLog.Info("Adding running container to the list of ignored containers")
		startIgnoringContainer(pod.GetId())
		ctx := namespaces.WithNamespace(context.Background(), k8sContainerdNamespace)
		pssr := criRuntime.PodSandboxStatusRequest{
			PodSandboxId: pod.GetId(),
		}
		cont, err := c.RuntimeServiceClient.PodSandboxStatus(ctx, &pssr)
		if err != nil {
			continue
		}
		cIP := c.getCiliumIP(cont.GetStatus())
		if cIP == nil {
			continue
		}
		if err := allocator.AllocateIP(cIP.IP(), "ignored workload"); err != nil {
			continue
		}
		//TODO Release this address when the ignored container leaves
		scopedLog.WithFields(logrus.Fields{
			logfields.IPAddr: cIP.IP(),
		}).Info("Found container running with potential " +
			"collision IP address, adding to the list " +
			"of allocated IPs")
	}
}
525779
func (gw *Gateway) ignoreTextEmpty(msg *config.Message) bool {
	if msg.Text != "" {
		return false
	}
	if msg.Event == config.EventUserTyping {
		return false
	}
	// we have an attachment or actual bytes, do not ignore
	if msg.Extra != nil &&
		(msg.Extra["attachments"] != nil ||
			len(msg.Extra["file"]) > 0 ||
			len(msg.Extra[config.EventFileFailureSize]) > 0) {
		return false
	}
	gw.logger.Debugf("ignoring empty message %#v from %s", msg, msg.Account)
	return true
}
152933
func (s *ValidateService) IgnoreUnavailable(ignoreUnavailable bool) *ValidateService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
1195606
func (o *Options) IgnoreSizeMax(name string) bool {
	for _, pattern := range o.LargeFiles {
		pattern = strings.TrimSpace(pattern)
		m, _ := filepath.Match(pattern, name)
		if m {
			return true
		}
	}

	return false
}
1348737
func (s *IndicesGetMappingService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesGetMappingService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
1213840
func exclude(files []string, exclude ...string) []string {
	var s []string
Outer:
	for _, f := range files {
		for _, e := range exclude {
			if f == e {
				continue Outer
			}
		}
		s = append(s, f)
	}
	return s
}
612934
func (s *IndicesSegmentsService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesSegmentsService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
340152
func (s *OpenIndexService) IgnoreUnavailable(ignoreUnavailable bool) *OpenIndexService {
	s.ignoreUnavailable = &ignoreUnavailable
	return s
}
908889
func IgnoreErrRemoved(err error) error {
	cause := errors.Cause(err)
	if cause == ErrRemoved {
		return nil
	}
	return err
}
121091
func (e *FileEvent) ignoreLinux() bool {
	// Ignore anything the inotify API says to ignore
	if e.mask&sys_IN_IGNORED == sys_IN_IGNORED {
		return true
	}

	// If the event is not a DELETE or RENAME, the file must exist.
	// Otherwise the event is ignored.
	// *Note*: this was put in place because it was seen that a MODIFY
	// event was sent after the DELETE. This ignores that MODIFY and
	// assumes a DELETE will come or has come if the file doesn't exist.
	if !(e.IsDelete() || e.IsRename()) {
		_, statErr := os.Lstat(e.Name)
		return os.IsNotExist(statErr)
	}
	return false
}
620716
func (api *InterfaceAPI) Exclude(key string) *InterfaceAPI {
	api.exclude(key)
	return api
}
902042
func (fiInfo *FieldInfo) Ignored() bool {
	tagJSON := ucon.NewTagJSON(fiInfo.Base.Tag)
	if tagJSON.Ignored() {
		return true
	}

	return false
}
25778
func (s *Scanner) skipWhitespace() {
	for s.cur == ' ' || s.cur == '\t' || s.cur == '\r' {
		s.read()
	}
}