directives.go
func (d *directiveParser) IsIgnored(issue *Issue) bool {
	d.lock.Lock()
	path := issue.Path.Relative()
	ranges, ok := d.files[path]
	if !ok {
		ranges = d.parseFile(path)
		sort.Sort(ranges)
		d.files[path] = ranges
	}
	d.lock.Unlock()
	for _, r := range ranges {
		if r.matches(issue) {
			debug("nolint: matched %s to issue %s", r, issue)
			r.matched = true
			return true
		}
	}
	return false
}
func (d *directiveParser) IsIgnored(issue *Issue) bool {
	d.lock.Lock()
	path := issue.Path.Relative()
	ranges, ok := d.files[path]
	if !ok {
		ranges = d.parseFile(path)
		sort.Sort(ranges)
		d.files[path] = ranges
	}
	d.lock.Unlock()
	for _, r := range ranges {
		if r.matches(issue) {
			debug("nolint: matched %s to issue %s", r, issue)
			r.matched = true
			return true
		}
	}
	return false
}
// IsIgnored returns true if the given linter issue is ignored by a linter directive.