func IsDocumentation(path string) bool {
	return doxRE.MatchString(path)
}
Checks if path contains a filename commonly belonging to documentation.
package linguist
import (
	"log"
	"regexp"
	"strings"
	"gopkg.in/yaml.v1"
)
func ShouldIgnoreFilename(filename string) bool {
	return IsVendored(filename) || IsDocumentation(filename)
}
func ShouldIgnoreContents(contents []byte) bool {
	return IsBinary(contents)
}
var vendorRE *regexp.Regexp
var doxRE *regexp.Regexp
func init() {
	var regexps []string
	bytes := []byte(files["data/vendor.yml"])
	if err := yaml.Unmarshal(bytes, &regexps); err != nil {
		log.Fatal(err)
		return
	}
	vendorRE = regexp.MustCompile(strings.Join(regexps, "|"))
	var moreregex []string
	bytes = []byte(files["data/documentation.yml"])
	if err := yaml.Unmarshal(bytes, &moreregex); err != nil {
		log.Fatal(err)
		return
	}
	doxRE = regexp.MustCompile(strings.Join(moreregex, "|"))
}
func IsVendored(path string) bool {
	return vendorRE.MatchString(path)
}