IsTest function for top 10 languages

This commit is contained in:
Máximo Cuadros
2020-04-06 16:23:48 +02:00
parent 4fb0b4cc5e
commit b851ee83ad
4 changed files with 64 additions and 0 deletions

View File

@ -60,6 +60,11 @@ func IsVendor(path string) bool {
return data.VendorMatchers.Match(path)
}
// IsTest returns whether or not path is a test path.
func IsTest(path string) bool {
return data.TestMatchers.Match(path)
}
// IsBinary detects if data is a binary value based on:
// http://git.kernel.org/cgit/git/git.git/tree/xdiff-interface.c?id=HEAD#n198
func IsBinary(data []byte) bool {