mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-05-23 16:40:08 -03:00
regexp for vendored files and directories are generated in vendor_matchers.go
This commit is contained in:
parent
5e13b984c9
commit
e998b0ff2e
@ -1,84 +0,0 @@
|
|||||||
package slinguist
|
|
||||||
|
|
||||||
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
|
||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
|
||||||
// Extracted from github/linguist commit: {{ getCommit }}
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"gopkg.in/toqueteos/substring.v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
func IsAuxiliaryLanguage(lang string) bool {
|
|
||||||
_, ok := auxiliaryLanguages[lang]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsConfiguration(path string) bool {
|
|
||||||
lang, _ := GetLanguageByExtension(path)
|
|
||||||
_, is := configurationLanguages[lang]
|
|
||||||
|
|
||||||
return is
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDotFile(path string) bool {
|
|
||||||
return strings.HasPrefix(filepath.Base(path), ".")
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsVendor(path string) bool {
|
|
||||||
return findIndex(path, vendorMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDocumentation(path string) bool {
|
|
||||||
return findIndex(path, documentationMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func findIndex(path string, matchers substring.StringsMatcher) int {
|
|
||||||
return matchers.MatchIndex(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
const sniffLen = 8000
|
|
||||||
|
|
||||||
//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 {
|
|
||||||
if len(data) > sniffLen {
|
|
||||||
data = data[:sniffLen]
|
|
||||||
}
|
|
||||||
|
|
||||||
if bytes.IndexByte(data, byte(0)) == -1 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
var vendorMatchers = substring.Or(
|
|
||||||
{{range $regexp := . -}}
|
|
||||||
substring.Regexp(`{{ $regexp }}`),
|
|
||||||
{{end -}}
|
|
||||||
)
|
|
||||||
|
|
||||||
var documentationMatchers = substring.Or(
|
|
||||||
substring.Regexp(`^docs?/`),
|
|
||||||
substring.Regexp(`(^|/)[Dd]ocumentation/`),
|
|
||||||
substring.Regexp(`(^|/)javadoc/`),
|
|
||||||
substring.Regexp(`^man/`),
|
|
||||||
substring.Regexp(`^[Ee]xamples/`),
|
|
||||||
substring.Regexp(`(^|/)CHANGE(S|LOG)?(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)CONTRIBUTING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)COPYING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)INSTALL(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)LICEN[CS]E(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Ll]icen[cs]e(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)README(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Rr]eadme(\.|$)`),
|
|
||||||
substring.Regexp(`^[Ss]amples/`),
|
|
||||||
)
|
|
||||||
|
|
||||||
var configurationLanguages = map[string]bool{
|
|
||||||
"XML": true, "JSON": true, "TOML": true, "YAML": true, "INI": true, "SQL": true,
|
|
||||||
}
|
|
13
internal/code-generator/assets/vendor.go.tmpl
Normal file
13
internal/code-generator/assets/vendor.go.tmpl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package slinguist
|
||||||
|
|
||||||
|
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
||||||
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
|
// Extracted from github/linguist commit: {{ getCommit }}
|
||||||
|
|
||||||
|
import "gopkg.in/toqueteos/substring.v1"
|
||||||
|
|
||||||
|
var vendorMatchers = substring.Or(
|
||||||
|
{{range $regexp := . -}}
|
||||||
|
substring.Regexp(`{{ $regexp }}`),
|
||||||
|
{{end -}}
|
||||||
|
)
|
@ -13,7 +13,7 @@ const (
|
|||||||
// FromFile test
|
// FromFile test
|
||||||
formatedLangGold = "test_files/formated_languages.gold"
|
formatedLangGold = "test_files/formated_languages.gold"
|
||||||
formatedContentGold = "test_files/formated_content.gold"
|
formatedContentGold = "test_files/formated_content.gold"
|
||||||
formatedUtilsGold = "test_files/formated_utils.gold"
|
formatedVendorGold = "test_files/formated_vendor.gold"
|
||||||
|
|
||||||
// Languages test
|
// Languages test
|
||||||
ymlTestFile = "test_files/languages.test.yml"
|
ymlTestFile = "test_files/languages.test.yml"
|
||||||
@ -31,9 +31,9 @@ const (
|
|||||||
|
|
||||||
// Vendor test
|
// Vendor test
|
||||||
vendorTestFile = "test_files/vendor.test.yml"
|
vendorTestFile = "test_files/vendor.test.yml"
|
||||||
utilsGold = "test_files/utils.gold"
|
vendorGold = "test_files/vendor.gold"
|
||||||
utilsTestTmplPath = "test_files/utils.test.go.tmpl"
|
vendorTestTmplPath = "test_files/vendor.test.go.tmpl"
|
||||||
utilsTestTmplName = "utils.test.go.tmpl"
|
vendorTestTmplName = "vendor.test.go.tmpl"
|
||||||
commitVendorTest = "fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7"
|
commitVendorTest = "fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ func TestFromFile(t *testing.T) {
|
|||||||
goldContent, err := ioutil.ReadFile(formatedContentGold)
|
goldContent, err := ioutil.ReadFile(formatedContentGold)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
goldUtils, err := ioutil.ReadFile(formatedUtilsGold)
|
goldVendor, err := ioutil.ReadFile(formatedVendorGold)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
outPathLang, err := ioutil.TempFile("/tmp", "generator-test-")
|
outPathLang, err := ioutil.TempFile("/tmp", "generator-test-")
|
||||||
@ -55,7 +55,7 @@ func TestFromFile(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
defer os.Remove(outPathContent.Name())
|
defer os.Remove(outPathContent.Name())
|
||||||
|
|
||||||
outPathUtils, err := ioutil.TempFile("/tmp", "generator-test-")
|
outPathVendor, err := ioutil.TempFile("/tmp", "generator-test-")
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
defer os.Remove(outPathContent.Name())
|
defer os.Remove(outPathContent.Name())
|
||||||
|
|
||||||
@ -92,12 +92,12 @@ func TestFromFile(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "TestFromFile_Vendor",
|
name: "TestFromFile_Vendor",
|
||||||
fileToParse: vendorTestFile,
|
fileToParse: vendorTestFile,
|
||||||
outPath: outPathUtils.Name(),
|
outPath: outPathVendor.Name(),
|
||||||
tmplPath: utilsTestTmplPath,
|
tmplPath: vendorTestTmplPath,
|
||||||
tmplName: utilsTestTmplName,
|
tmplName: vendorTestTmplName,
|
||||||
commit: commitVendorTest,
|
commit: commitVendorTest,
|
||||||
generate: Vendor,
|
generate: Vendor,
|
||||||
wantOut: goldUtils,
|
wantOut: goldVendor,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ func TestHeuristics(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestVendor(t *testing.T) {
|
func TestVendor(t *testing.T) {
|
||||||
gold, err := ioutil.ReadFile(utilsGold)
|
gold, err := ioutil.ReadFile(vendorGold)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
input, err := ioutil.ReadFile(vendorTestFile)
|
input, err := ioutil.ReadFile(vendorTestFile)
|
||||||
@ -198,8 +198,8 @@ func TestVendor(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "TestVendor",
|
name: "TestVendor",
|
||||||
input: input,
|
input: input,
|
||||||
tmplPath: utilsTestTmplPath,
|
tmplPath: vendorTestTmplPath,
|
||||||
tmplName: utilsTestTmplName,
|
tmplName: vendorTestTmplName,
|
||||||
commit: commitVendorTest,
|
commit: commitVendorTest,
|
||||||
wantOut: gold,
|
wantOut: gold,
|
||||||
},
|
},
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
package slinguist
|
|
||||||
|
|
||||||
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
|
||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
|
||||||
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"gopkg.in/toqueteos/substring.v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
func IsAuxiliaryLanguage(lang string) bool {
|
|
||||||
_, ok := auxiliaryLanguages[lang]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsConfiguration(path string) bool {
|
|
||||||
lang, _ := GetLanguageByExtension(path)
|
|
||||||
_, is := configurationLanguages[lang]
|
|
||||||
|
|
||||||
return is
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDotFile(path string) bool {
|
|
||||||
return strings.HasPrefix(filepath.Base(path), ".")
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsVendor(path string) bool {
|
|
||||||
return findIndex(path, vendorMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDocumentation(path string) bool {
|
|
||||||
return findIndex(path, documentationMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func findIndex(path string, matchers substring.StringsMatcher) int {
|
|
||||||
return matchers.MatchIndex(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
const sniffLen = 8000
|
|
||||||
|
|
||||||
//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 {
|
|
||||||
if len(data) > sniffLen {
|
|
||||||
data = data[:sniffLen]
|
|
||||||
}
|
|
||||||
|
|
||||||
if bytes.IndexByte(data, byte(0)) == -1 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
var vendorMatchers = substring.Or(
|
|
||||||
substring.Regexp(`(^|/)cache/`),
|
|
||||||
substring.Regexp(`^[Dd]ependencies/`),
|
|
||||||
substring.Regexp(`(^|/)dist/`),
|
|
||||||
substring.Regexp(`^deps/`),
|
|
||||||
substring.Regexp(`^tools/`),
|
|
||||||
substring.Regexp(`(^|/)configure$`),
|
|
||||||
substring.Regexp(`(^|/)config.guess$`),
|
|
||||||
substring.Regexp(`(^|/)config.sub$`),
|
|
||||||
substring.Regexp(`(^|/)aclocal.m4`),
|
|
||||||
substring.Regexp(`(^|/)libtool.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltoptions.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltsugar.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltversion.m4`),
|
|
||||||
substring.Regexp(`(^|/)lt~obsolete.m4`),
|
|
||||||
)
|
|
||||||
|
|
||||||
var documentationMatchers = substring.Or(
|
|
||||||
substring.Regexp(`^docs?/`),
|
|
||||||
substring.Regexp(`(^|/)[Dd]ocumentation/`),
|
|
||||||
substring.Regexp(`(^|/)javadoc/`),
|
|
||||||
substring.Regexp(`^man/`),
|
|
||||||
substring.Regexp(`^[Ee]xamples/`),
|
|
||||||
substring.Regexp(`(^|/)CHANGE(S|LOG)?(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)CONTRIBUTING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)COPYING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)INSTALL(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)LICEN[CS]E(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Ll]icen[cs]e(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)README(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Rr]eadme(\.|$)`),
|
|
||||||
substring.Regexp(`^[Ss]amples/`),
|
|
||||||
)
|
|
||||||
|
|
||||||
var configurationLanguages = map[string]bool{
|
|
||||||
"XML": true, "JSON": true, "TOML": true, "YAML": true, "INI": true, "SQL": true,
|
|
||||||
}
|
|
@ -0,0 +1,24 @@
|
|||||||
|
package slinguist
|
||||||
|
|
||||||
|
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
||||||
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
|
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
||||||
|
|
||||||
|
import "gopkg.in/toqueteos/substring.v1"
|
||||||
|
|
||||||
|
var vendorMatchers = substring.Or(
|
||||||
|
substring.Regexp(`(^|/)cache/`),
|
||||||
|
substring.Regexp(`^[Dd]ependencies/`),
|
||||||
|
substring.Regexp(`(^|/)dist/`),
|
||||||
|
substring.Regexp(`^deps/`),
|
||||||
|
substring.Regexp(`^tools/`),
|
||||||
|
substring.Regexp(`(^|/)configure$`),
|
||||||
|
substring.Regexp(`(^|/)config.guess$`),
|
||||||
|
substring.Regexp(`(^|/)config.sub$`),
|
||||||
|
substring.Regexp(`(^|/)aclocal.m4`),
|
||||||
|
substring.Regexp(`(^|/)libtool.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltoptions.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltsugar.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltversion.m4`),
|
||||||
|
substring.Regexp(`(^|/)lt~obsolete.m4`),
|
||||||
|
)
|
@ -1,95 +0,0 @@
|
|||||||
package slinguist
|
|
||||||
|
|
||||||
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
|
||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
|
||||||
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"gopkg.in/toqueteos/substring.v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
func IsAuxiliaryLanguage(lang string) bool {
|
|
||||||
_, ok := auxiliaryLanguages[lang]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsConfiguration(path string) bool {
|
|
||||||
lang, _ := GetLanguageByExtension(path)
|
|
||||||
_, is := configurationLanguages[lang]
|
|
||||||
|
|
||||||
return is
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDotFile(path string) bool {
|
|
||||||
return strings.HasPrefix(filepath.Base(path), ".")
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsVendor(path string) bool {
|
|
||||||
return findIndex(path, vendorMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDocumentation(path string) bool {
|
|
||||||
return findIndex(path, documentationMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func findIndex(path string, matchers substring.StringsMatcher) int {
|
|
||||||
return matchers.MatchIndex(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
const sniffLen = 8000
|
|
||||||
|
|
||||||
//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 {
|
|
||||||
if len(data) > sniffLen {
|
|
||||||
data = data[:sniffLen]
|
|
||||||
}
|
|
||||||
|
|
||||||
if bytes.IndexByte(data, byte(0)) == -1 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
var vendorMatchers = substring.Or(
|
|
||||||
substring.Regexp(`(^|/)cache/`),
|
|
||||||
substring.Regexp(`^[Dd]ependencies/`),
|
|
||||||
substring.Regexp(`(^|/)dist/`),
|
|
||||||
substring.Regexp(`^deps/`),
|
|
||||||
substring.Regexp(`^tools/`),
|
|
||||||
substring.Regexp(`(^|/)configure$`),
|
|
||||||
substring.Regexp(`(^|/)config.guess$`),
|
|
||||||
substring.Regexp(`(^|/)config.sub$`),
|
|
||||||
substring.Regexp(`(^|/)aclocal.m4`),
|
|
||||||
substring.Regexp(`(^|/)libtool.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltoptions.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltsugar.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltversion.m4`),
|
|
||||||
substring.Regexp(`(^|/)lt~obsolete.m4`),
|
|
||||||
)
|
|
||||||
|
|
||||||
var documentationMatchers = substring.Or(
|
|
||||||
substring.Regexp(`^docs?/`),
|
|
||||||
substring.Regexp(`(^|/)[Dd]ocumentation/`),
|
|
||||||
substring.Regexp(`(^|/)javadoc/`),
|
|
||||||
substring.Regexp(`^man/`),
|
|
||||||
substring.Regexp(`^[Ee]xamples/`),
|
|
||||||
substring.Regexp(`(^|/)CHANGE(S|LOG)?(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)CONTRIBUTING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)COPYING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)INSTALL(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)LICEN[CS]E(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Ll]icen[cs]e(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)README(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Rr]eadme(\.|$)`),
|
|
||||||
substring.Regexp(`^[Ss]amples/`),
|
|
||||||
)
|
|
||||||
|
|
||||||
var configurationLanguages = map[string]bool{
|
|
||||||
"XML": true, "JSON": true, "TOML": true, "YAML": true, "INI": true, "SQL": true,
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
package slinguist
|
|
||||||
|
|
||||||
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
|
||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
|
||||||
// Extracted from github/linguist commit: {{ getCommit }}
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"gopkg.in/toqueteos/substring.v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
func IsAuxiliaryLanguage(lang string) bool {
|
|
||||||
_, ok := auxiliaryLanguages[lang]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsConfiguration(path string) bool {
|
|
||||||
lang, _ := GetLanguageByExtension(path)
|
|
||||||
_, is := configurationLanguages[lang]
|
|
||||||
|
|
||||||
return is
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDotFile(path string) bool {
|
|
||||||
return strings.HasPrefix(filepath.Base(path), ".")
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsVendor(path string) bool {
|
|
||||||
return findIndex(path, vendorMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func IsDocumentation(path string) bool {
|
|
||||||
return findIndex(path, documentationMatchers) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func findIndex(path string, matchers substring.StringsMatcher) int {
|
|
||||||
return matchers.MatchIndex(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
const sniffLen = 8000
|
|
||||||
|
|
||||||
//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 {
|
|
||||||
if len(data) > sniffLen {
|
|
||||||
data = data[:sniffLen]
|
|
||||||
}
|
|
||||||
|
|
||||||
if bytes.IndexByte(data, byte(0)) == -1 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
var vendorMatchers = substring.Or(
|
|
||||||
{{range $regexp := . -}}
|
|
||||||
substring.Regexp(`{{ $regexp }}`),
|
|
||||||
{{end -}}
|
|
||||||
)
|
|
||||||
|
|
||||||
var documentationMatchers = substring.Or(
|
|
||||||
substring.Regexp(`^docs?/`),
|
|
||||||
substring.Regexp(`(^|/)[Dd]ocumentation/`),
|
|
||||||
substring.Regexp(`(^|/)javadoc/`),
|
|
||||||
substring.Regexp(`^man/`),
|
|
||||||
substring.Regexp(`^[Ee]xamples/`),
|
|
||||||
substring.Regexp(`(^|/)CHANGE(S|LOG)?(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)CONTRIBUTING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)COPYING(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)INSTALL(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)LICEN[CS]E(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Ll]icen[cs]e(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)README(\.|$)`),
|
|
||||||
substring.Regexp(`(^|/)[Rr]eadme(\.|$)`),
|
|
||||||
substring.Regexp(`^[Ss]amples/`),
|
|
||||||
)
|
|
||||||
|
|
||||||
var configurationLanguages = map[string]bool{
|
|
||||||
"XML": true, "JSON": true, "TOML": true, "YAML": true, "INI": true, "SQL": true,
|
|
||||||
}
|
|
24
internal/code-generator/generator/test_files/vendor.gold
Normal file
24
internal/code-generator/generator/test_files/vendor.gold
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package slinguist
|
||||||
|
|
||||||
|
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
||||||
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
|
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
||||||
|
|
||||||
|
import "gopkg.in/toqueteos/substring.v1"
|
||||||
|
|
||||||
|
var vendorMatchers = substring.Or(
|
||||||
|
substring.Regexp(`(^|/)cache/`),
|
||||||
|
substring.Regexp(`^[Dd]ependencies/`),
|
||||||
|
substring.Regexp(`(^|/)dist/`),
|
||||||
|
substring.Regexp(`^deps/`),
|
||||||
|
substring.Regexp(`^tools/`),
|
||||||
|
substring.Regexp(`(^|/)configure$`),
|
||||||
|
substring.Regexp(`(^|/)config.guess$`),
|
||||||
|
substring.Regexp(`(^|/)config.sub$`),
|
||||||
|
substring.Regexp(`(^|/)aclocal.m4`),
|
||||||
|
substring.Regexp(`(^|/)libtool.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltoptions.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltsugar.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltversion.m4`),
|
||||||
|
substring.Regexp(`(^|/)lt~obsolete.m4`),
|
||||||
|
)
|
@ -0,0 +1,13 @@
|
|||||||
|
package slinguist
|
||||||
|
|
||||||
|
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
||||||
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
|
// Extracted from github/linguist commit: {{ getCommit }}
|
||||||
|
|
||||||
|
import "gopkg.in/toqueteos/substring.v1"
|
||||||
|
|
||||||
|
var vendorMatchers = substring.Or(
|
||||||
|
{{range $regexp := . -}}
|
||||||
|
substring.Regexp(`{{ $regexp }}`),
|
||||||
|
{{end -}}
|
||||||
|
)
|
@ -19,9 +19,9 @@ const (
|
|||||||
contentTmpl = "content.go.tmpl"
|
contentTmpl = "content.go.tmpl"
|
||||||
|
|
||||||
vendorYAML = ".linguist/lib/linguist/vendor.yml"
|
vendorYAML = ".linguist/lib/linguist/vendor.yml"
|
||||||
utilsFile = "utils.go"
|
vendorFile = "vendor_matchers.go"
|
||||||
utilsTmplPath = "internal/code-generator/assets/utils.go.tmpl"
|
vendorTmplPath = "internal/code-generator/assets/vendor.go.tmpl"
|
||||||
utilsTmpl = "utils.go.tmpl"
|
vendorTmpl = "vendor.go.tmpl"
|
||||||
|
|
||||||
commitPath = ".git/refs/heads/master"
|
commitPath = ".git/refs/heads/master"
|
||||||
)
|
)
|
||||||
@ -40,11 +40,7 @@ func main() {
|
|||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := generator.FromFile(vendorYAML, utilsFile, utilsTmplPath, utilsTmpl, commit, generator.Vendor); err != nil {
|
if err := generator.FromFile(vendorYAML, vendorFile, vendorTmplPath, vendorTmpl, commit, generator.Vendor); err != nil {
|
||||||
log.Println(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := generator.FromFile(vendorYAML, utilsFile, utilsTmplPath, utilsTmpl, commit, generator.Vendor); err != nil {
|
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
153
utils.go
153
utils.go
@ -1,9 +1,5 @@
|
|||||||
package slinguist
|
package slinguist
|
||||||
|
|
||||||
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
|
||||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
|
||||||
// Extracted from github/linguist commit: dae33dc2b20cddc85d1300435c3be7118a7115a9
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -56,155 +52,6 @@ func IsBinary(data []byte) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
var vendorMatchers = substring.Or(
|
|
||||||
substring.Regexp(`(^|/)cache/`),
|
|
||||||
substring.Regexp(`^[Dd]ependencies/`),
|
|
||||||
substring.Regexp(`(^|/)dist/`),
|
|
||||||
substring.Regexp(`^deps/`),
|
|
||||||
substring.Regexp(`^tools/`),
|
|
||||||
substring.Regexp(`(^|/)configure$`),
|
|
||||||
substring.Regexp(`(^|/)config.guess$`),
|
|
||||||
substring.Regexp(`(^|/)config.sub$`),
|
|
||||||
substring.Regexp(`(^|/)aclocal.m4`),
|
|
||||||
substring.Regexp(`(^|/)libtool.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltoptions.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltsugar.m4`),
|
|
||||||
substring.Regexp(`(^|/)ltversion.m4`),
|
|
||||||
substring.Regexp(`(^|/)lt~obsolete.m4`),
|
|
||||||
substring.Regexp(`cpplint.py`),
|
|
||||||
substring.Regexp(`node_modules/`),
|
|
||||||
substring.Regexp(`bower_components/`),
|
|
||||||
substring.Regexp(`^rebar$`),
|
|
||||||
substring.Regexp(`erlang.mk`),
|
|
||||||
substring.Regexp(`Godeps/_workspace/`),
|
|
||||||
substring.Regexp(`.indent.pro`),
|
|
||||||
substring.Regexp(`(\.|-)min\.(js|css)$`),
|
|
||||||
substring.Regexp(`([^\s]*)import\.(css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`(^|/)bootstrap([^.]*)\.(js|css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`(^|/)custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`(^|/)font-awesome\.(css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`(^|/)foundation\.(css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`(^|/)normalize\.(css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`(^|/)[Bb]ourbon/.*\.(css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`(^|/)animate\.(css|less|scss|styl)$`),
|
|
||||||
substring.Regexp(`third[-_]?party/`),
|
|
||||||
substring.Regexp(`3rd[-_]?party/`),
|
|
||||||
substring.Regexp(`vendors?/`),
|
|
||||||
substring.Regexp(`extern(al)?/`),
|
|
||||||
substring.Regexp(`(^|/)[Vv]+endor/`),
|
|
||||||
substring.Regexp(`^debian/`),
|
|
||||||
substring.Regexp(`run.n$`),
|
|
||||||
substring.Regexp(`bootstrap-datepicker/`),
|
|
||||||
substring.Regexp(`(^|/)jquery([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)jquery\-\d\.\d+(\.\d+)?\.js$`),
|
|
||||||
substring.Regexp(`(^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?\.(js|css)$`),
|
|
||||||
substring.Regexp(`(^|/)jquery\.(ui|effects)\.([^.]*)\.(js|css)$`),
|
|
||||||
substring.Regexp(`jquery.fn.gantt.js`),
|
|
||||||
substring.Regexp(`jquery.fancybox.(js|css)`),
|
|
||||||
substring.Regexp(`fuelux.js`),
|
|
||||||
substring.Regexp(`(^|/)jquery\.fileupload(-\w+)?\.js$`),
|
|
||||||
substring.Regexp(`(^|/)slick\.\w+.js$`),
|
|
||||||
substring.Regexp(`(^|/)Leaflet\.Coordinates-\d+\.\d+\.\d+\.src\.js$`),
|
|
||||||
substring.Regexp(`leaflet.draw-src.js`),
|
|
||||||
substring.Regexp(`leaflet.draw.css`),
|
|
||||||
substring.Regexp(`Control.FullScreen.css`),
|
|
||||||
substring.Regexp(`Control.FullScreen.js`),
|
|
||||||
substring.Regexp(`leaflet.spin.js`),
|
|
||||||
substring.Regexp(`wicket-leaflet.js`),
|
|
||||||
substring.Regexp(`.sublime-project`),
|
|
||||||
substring.Regexp(`.sublime-workspace`),
|
|
||||||
substring.Regexp(`(^|/)prototype(.*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)effects\.js$`),
|
|
||||||
substring.Regexp(`(^|/)controls\.js$`),
|
|
||||||
substring.Regexp(`(^|/)dragdrop\.js$`),
|
|
||||||
substring.Regexp(`(.*?)\.d\.ts$`),
|
|
||||||
substring.Regexp(`(^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)dojo\.js$`),
|
|
||||||
substring.Regexp(`(^|/)MochiKit\.js$`),
|
|
||||||
substring.Regexp(`(^|/)yahoo-([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)yui([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)ckeditor\.js$`),
|
|
||||||
substring.Regexp(`(^|/)tiny_mce([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)tiny_mce/(langs|plugins|themes|utils)`),
|
|
||||||
substring.Regexp(`(^|/)ace-builds/`),
|
|
||||||
substring.Regexp(`(^|/)fontello(.*?)\.css$`),
|
|
||||||
substring.Regexp(`(^|/)MathJax/`),
|
|
||||||
substring.Regexp(`(^|/)Chart\.js$`),
|
|
||||||
substring.Regexp(`(^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo)`),
|
|
||||||
substring.Regexp(`(^|/)shBrush([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)shCore\.js$`),
|
|
||||||
substring.Regexp(`(^|/)shLegacy\.js$`),
|
|
||||||
substring.Regexp(`(^|/)angular([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|\/)d3(\.v\d+)?([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)react(-[^.]*)?\.js$`),
|
|
||||||
substring.Regexp(`(^|/)modernizr\-\d\.\d+(\.\d+)?\.js$`),
|
|
||||||
substring.Regexp(`(^|/)modernizr\.custom\.\d+\.js$`),
|
|
||||||
substring.Regexp(`(^|/)knockout-(\d+\.){3}(debug\.)?js$`),
|
|
||||||
substring.Regexp(`(^|/)docs?/_?(build|themes?|templates?|static)/`),
|
|
||||||
substring.Regexp(`(^|/)admin_media/`),
|
|
||||||
substring.Regexp(`(^|/)env/`),
|
|
||||||
substring.Regexp(`^fabfile\.py$`),
|
|
||||||
substring.Regexp(`^waf$`),
|
|
||||||
substring.Regexp(`^.osx$`),
|
|
||||||
substring.Regexp(`\.xctemplate/`),
|
|
||||||
substring.Regexp(`\.imageset/`),
|
|
||||||
substring.Regexp(`^Carthage/`),
|
|
||||||
substring.Regexp(`^Pods/`),
|
|
||||||
substring.Regexp(`(^|/)Sparkle/`),
|
|
||||||
substring.Regexp(`Crashlytics.framework/`),
|
|
||||||
substring.Regexp(`Fabric.framework/`),
|
|
||||||
substring.Regexp(`BuddyBuildSDK.framework/`),
|
|
||||||
substring.Regexp(`Realm.framework`),
|
|
||||||
substring.Regexp(`RealmSwift.framework`),
|
|
||||||
substring.Regexp(`gitattributes$`),
|
|
||||||
substring.Regexp(`gitignore$`),
|
|
||||||
substring.Regexp(`gitmodules$`),
|
|
||||||
substring.Regexp(`(^|/)gradlew$`),
|
|
||||||
substring.Regexp(`(^|/)gradlew\.bat$`),
|
|
||||||
substring.Regexp(`(^|/)gradle/wrapper/`),
|
|
||||||
substring.Regexp(`-vsdoc\.js$`),
|
|
||||||
substring.Regexp(`\.intellisense\.js$`),
|
|
||||||
substring.Regexp(`(^|/)jquery([^.]*)\.validate(\.unobtrusive)?\.js$`),
|
|
||||||
substring.Regexp(`(^|/)jquery([^.]*)\.unobtrusive\-ajax\.js$`),
|
|
||||||
substring.Regexp(`(^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$`),
|
|
||||||
substring.Regexp(`^[Pp]ackages\/.+\.\d+\/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/.*?\.js$`),
|
|
||||||
substring.Regexp(`(^|/)extjs/.*?\.xml$`),
|
|
||||||
substring.Regexp(`(^|/)extjs/.*?\.txt$`),
|
|
||||||
substring.Regexp(`(^|/)extjs/.*?\.html$`),
|
|
||||||
substring.Regexp(`(^|/)extjs/.*?\.properties$`),
|
|
||||||
substring.Regexp(`(^|/)extjs/.sencha/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/docs/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/builds/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/cmd/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/examples/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/locale/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/packages/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/plugins/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/resources/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/src/`),
|
|
||||||
substring.Regexp(`(^|/)extjs/welcome/`),
|
|
||||||
substring.Regexp(`(^|/)html5shiv\.js$`),
|
|
||||||
substring.Regexp(`^[Tt]ests?/fixtures/`),
|
|
||||||
substring.Regexp(`^[Ss]pecs?/fixtures/`),
|
|
||||||
substring.Regexp(`(^|/)cordova([^.]*)\.js$`),
|
|
||||||
substring.Regexp(`(^|/)cordova\-\d\.\d(\.\d)?\.js$`),
|
|
||||||
substring.Regexp(`foundation(\..*)?\.js$`),
|
|
||||||
substring.Regexp(`^Vagrantfile$`),
|
|
||||||
substring.Regexp(`.[Dd][Ss]_[Ss]tore$`),
|
|
||||||
substring.Regexp(`^vignettes/`),
|
|
||||||
substring.Regexp(`^inst/extdata/`),
|
|
||||||
substring.Regexp(`octicons.css`),
|
|
||||||
substring.Regexp(`sprockets-octicons.scss`),
|
|
||||||
substring.Regexp(`(^|/)activator$`),
|
|
||||||
substring.Regexp(`(^|/)activator\.bat$`),
|
|
||||||
substring.Regexp(`proguard.pro`),
|
|
||||||
substring.Regexp(`proguard-rules.pro`),
|
|
||||||
substring.Regexp(`^puphpet/`),
|
|
||||||
substring.Regexp(`(^|/)\.google_apis/`),
|
|
||||||
substring.Regexp(`^Jenkinsfile$`),
|
|
||||||
)
|
|
||||||
|
|
||||||
var documentationMatchers = substring.Or(
|
var documentationMatchers = substring.Or(
|
||||||
substring.Regexp(`^docs?/`),
|
substring.Regexp(`^docs?/`),
|
||||||
substring.Regexp(`(^|/)[Dd]ocumentation/`),
|
substring.Regexp(`(^|/)[Dd]ocumentation/`),
|
||||||
|
156
vendor_matchers.go
Normal file
156
vendor_matchers.go
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
package slinguist
|
||||||
|
|
||||||
|
// CODE GENERATED AUTOMATICALLY WITH github.com/src-d/simple-linguist/cli/slinguist-generate
|
||||||
|
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||||
|
// Extracted from github/linguist commit: dae33dc2b20cddc85d1300435c3be7118a7115a9
|
||||||
|
|
||||||
|
import "gopkg.in/toqueteos/substring.v1"
|
||||||
|
|
||||||
|
var vendorMatchers = substring.Or(
|
||||||
|
substring.Regexp(`(^|/)cache/`),
|
||||||
|
substring.Regexp(`^[Dd]ependencies/`),
|
||||||
|
substring.Regexp(`(^|/)dist/`),
|
||||||
|
substring.Regexp(`^deps/`),
|
||||||
|
substring.Regexp(`^tools/`),
|
||||||
|
substring.Regexp(`(^|/)configure$`),
|
||||||
|
substring.Regexp(`(^|/)config.guess$`),
|
||||||
|
substring.Regexp(`(^|/)config.sub$`),
|
||||||
|
substring.Regexp(`(^|/)aclocal.m4`),
|
||||||
|
substring.Regexp(`(^|/)libtool.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltoptions.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltsugar.m4`),
|
||||||
|
substring.Regexp(`(^|/)ltversion.m4`),
|
||||||
|
substring.Regexp(`(^|/)lt~obsolete.m4`),
|
||||||
|
substring.Regexp(`cpplint.py`),
|
||||||
|
substring.Regexp(`node_modules/`),
|
||||||
|
substring.Regexp(`bower_components/`),
|
||||||
|
substring.Regexp(`^rebar$`),
|
||||||
|
substring.Regexp(`erlang.mk`),
|
||||||
|
substring.Regexp(`Godeps/_workspace/`),
|
||||||
|
substring.Regexp(`.indent.pro`),
|
||||||
|
substring.Regexp(`(\.|-)min\.(js|css)$`),
|
||||||
|
substring.Regexp(`([^\s]*)import\.(css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`(^|/)bootstrap([^.]*)\.(js|css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`(^|/)custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`(^|/)font-awesome\.(css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`(^|/)foundation\.(css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`(^|/)normalize\.(css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`(^|/)[Bb]ourbon/.*\.(css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`(^|/)animate\.(css|less|scss|styl)$`),
|
||||||
|
substring.Regexp(`third[-_]?party/`),
|
||||||
|
substring.Regexp(`3rd[-_]?party/`),
|
||||||
|
substring.Regexp(`vendors?/`),
|
||||||
|
substring.Regexp(`extern(al)?/`),
|
||||||
|
substring.Regexp(`(^|/)[Vv]+endor/`),
|
||||||
|
substring.Regexp(`^debian/`),
|
||||||
|
substring.Regexp(`run.n$`),
|
||||||
|
substring.Regexp(`bootstrap-datepicker/`),
|
||||||
|
substring.Regexp(`(^|/)jquery([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)jquery\-\d\.\d+(\.\d+)?\.js$`),
|
||||||
|
substring.Regexp(`(^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?\.(js|css)$`),
|
||||||
|
substring.Regexp(`(^|/)jquery\.(ui|effects)\.([^.]*)\.(js|css)$`),
|
||||||
|
substring.Regexp(`jquery.fn.gantt.js`),
|
||||||
|
substring.Regexp(`jquery.fancybox.(js|css)`),
|
||||||
|
substring.Regexp(`fuelux.js`),
|
||||||
|
substring.Regexp(`(^|/)jquery\.fileupload(-\w+)?\.js$`),
|
||||||
|
substring.Regexp(`(^|/)slick\.\w+.js$`),
|
||||||
|
substring.Regexp(`(^|/)Leaflet\.Coordinates-\d+\.\d+\.\d+\.src\.js$`),
|
||||||
|
substring.Regexp(`leaflet.draw-src.js`),
|
||||||
|
substring.Regexp(`leaflet.draw.css`),
|
||||||
|
substring.Regexp(`Control.FullScreen.css`),
|
||||||
|
substring.Regexp(`Control.FullScreen.js`),
|
||||||
|
substring.Regexp(`leaflet.spin.js`),
|
||||||
|
substring.Regexp(`wicket-leaflet.js`),
|
||||||
|
substring.Regexp(`.sublime-project`),
|
||||||
|
substring.Regexp(`.sublime-workspace`),
|
||||||
|
substring.Regexp(`(^|/)prototype(.*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)effects\.js$`),
|
||||||
|
substring.Regexp(`(^|/)controls\.js$`),
|
||||||
|
substring.Regexp(`(^|/)dragdrop\.js$`),
|
||||||
|
substring.Regexp(`(.*?)\.d\.ts$`),
|
||||||
|
substring.Regexp(`(^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)dojo\.js$`),
|
||||||
|
substring.Regexp(`(^|/)MochiKit\.js$`),
|
||||||
|
substring.Regexp(`(^|/)yahoo-([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)yui([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)ckeditor\.js$`),
|
||||||
|
substring.Regexp(`(^|/)tiny_mce([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)tiny_mce/(langs|plugins|themes|utils)`),
|
||||||
|
substring.Regexp(`(^|/)ace-builds/`),
|
||||||
|
substring.Regexp(`(^|/)fontello(.*?)\.css$`),
|
||||||
|
substring.Regexp(`(^|/)MathJax/`),
|
||||||
|
substring.Regexp(`(^|/)Chart\.js$`),
|
||||||
|
substring.Regexp(`(^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo)`),
|
||||||
|
substring.Regexp(`(^|/)shBrush([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)shCore\.js$`),
|
||||||
|
substring.Regexp(`(^|/)shLegacy\.js$`),
|
||||||
|
substring.Regexp(`(^|/)angular([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|\/)d3(\.v\d+)?([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)react(-[^.]*)?\.js$`),
|
||||||
|
substring.Regexp(`(^|/)modernizr\-\d\.\d+(\.\d+)?\.js$`),
|
||||||
|
substring.Regexp(`(^|/)modernizr\.custom\.\d+\.js$`),
|
||||||
|
substring.Regexp(`(^|/)knockout-(\d+\.){3}(debug\.)?js$`),
|
||||||
|
substring.Regexp(`(^|/)docs?/_?(build|themes?|templates?|static)/`),
|
||||||
|
substring.Regexp(`(^|/)admin_media/`),
|
||||||
|
substring.Regexp(`(^|/)env/`),
|
||||||
|
substring.Regexp(`^fabfile\.py$`),
|
||||||
|
substring.Regexp(`^waf$`),
|
||||||
|
substring.Regexp(`^.osx$`),
|
||||||
|
substring.Regexp(`\.xctemplate/`),
|
||||||
|
substring.Regexp(`\.imageset/`),
|
||||||
|
substring.Regexp(`^Carthage/`),
|
||||||
|
substring.Regexp(`^Pods/`),
|
||||||
|
substring.Regexp(`(^|/)Sparkle/`),
|
||||||
|
substring.Regexp(`Crashlytics.framework/`),
|
||||||
|
substring.Regexp(`Fabric.framework/`),
|
||||||
|
substring.Regexp(`BuddyBuildSDK.framework/`),
|
||||||
|
substring.Regexp(`Realm.framework`),
|
||||||
|
substring.Regexp(`RealmSwift.framework`),
|
||||||
|
substring.Regexp(`gitattributes$`),
|
||||||
|
substring.Regexp(`gitignore$`),
|
||||||
|
substring.Regexp(`gitmodules$`),
|
||||||
|
substring.Regexp(`(^|/)gradlew$`),
|
||||||
|
substring.Regexp(`(^|/)gradlew\.bat$`),
|
||||||
|
substring.Regexp(`(^|/)gradle/wrapper/`),
|
||||||
|
substring.Regexp(`-vsdoc\.js$`),
|
||||||
|
substring.Regexp(`\.intellisense\.js$`),
|
||||||
|
substring.Regexp(`(^|/)jquery([^.]*)\.validate(\.unobtrusive)?\.js$`),
|
||||||
|
substring.Regexp(`(^|/)jquery([^.]*)\.unobtrusive\-ajax\.js$`),
|
||||||
|
substring.Regexp(`(^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$`),
|
||||||
|
substring.Regexp(`^[Pp]ackages\/.+\.\d+\/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/.*?\.js$`),
|
||||||
|
substring.Regexp(`(^|/)extjs/.*?\.xml$`),
|
||||||
|
substring.Regexp(`(^|/)extjs/.*?\.txt$`),
|
||||||
|
substring.Regexp(`(^|/)extjs/.*?\.html$`),
|
||||||
|
substring.Regexp(`(^|/)extjs/.*?\.properties$`),
|
||||||
|
substring.Regexp(`(^|/)extjs/.sencha/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/docs/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/builds/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/cmd/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/examples/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/locale/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/packages/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/plugins/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/resources/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/src/`),
|
||||||
|
substring.Regexp(`(^|/)extjs/welcome/`),
|
||||||
|
substring.Regexp(`(^|/)html5shiv\.js$`),
|
||||||
|
substring.Regexp(`^[Tt]ests?/fixtures/`),
|
||||||
|
substring.Regexp(`^[Ss]pecs?/fixtures/`),
|
||||||
|
substring.Regexp(`(^|/)cordova([^.]*)\.js$`),
|
||||||
|
substring.Regexp(`(^|/)cordova\-\d\.\d(\.\d)?\.js$`),
|
||||||
|
substring.Regexp(`foundation(\..*)?\.js$`),
|
||||||
|
substring.Regexp(`^Vagrantfile$`),
|
||||||
|
substring.Regexp(`.[Dd][Ss]_[Ss]tore$`),
|
||||||
|
substring.Regexp(`^vignettes/`),
|
||||||
|
substring.Regexp(`^inst/extdata/`),
|
||||||
|
substring.Regexp(`octicons.css`),
|
||||||
|
substring.Regexp(`sprockets-octicons.scss`),
|
||||||
|
substring.Regexp(`(^|/)activator$`),
|
||||||
|
substring.Regexp(`(^|/)activator\.bat$`),
|
||||||
|
substring.Regexp(`proguard.pro`),
|
||||||
|
substring.Regexp(`proguard-rules.pro`),
|
||||||
|
substring.Regexp(`^puphpet/`),
|
||||||
|
substring.Regexp(`(^|/)\.google_apis/`),
|
||||||
|
substring.Regexp(`^Jenkinsfile$`),
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user