Merge pull request #54 from dpaz/issue52

Moved commit.go to the data directory
This commit is contained in:
Santiago M. Mola 2017-06-28 04:30:12 -07:00 committed by GitHub
commit a2019d23fc
14 changed files with 870 additions and 416 deletions

View File

@ -8,6 +8,8 @@ import (
"path/filepath"
"testing"
"gopkg.in/src-d/enry.v1/data"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
@ -38,7 +40,7 @@ func (s *EnryTestSuite) SetupSuite() {
err = os.Chdir(s.repoLinguist)
assert.NoError(s.T(), err)
cmd = exec.Command("git", "checkout", linguistCommit)
cmd = exec.Command("git", "checkout", data.LinguistCommit)
err = cmd.Run()
assert.NoError(s.T(), err)

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
// LanguagesByAlias keeps alias for different languages and use the name of the languages as an alias too.
// All the keys (alias or not) are written in lower case and the whitespaces has been replaced by underscores.
@ -163,6 +163,7 @@ var LanguagesByAlias = map[string]string{
"dylan": "Dylan",
"e": "E",
"eagle": "Eagle",
"easybuild": "Easybuild",
"ebnf": "EBNF",
"ec": "eC",
"ecere_projects": "Ecere Projects",
@ -438,7 +439,7 @@ var LanguagesByAlias = map[string]string{
"pawn": "PAWN",
"pep8": "Pep8",
"perl": "Perl",
"perl6": "Perl6",
"perl_6": "Perl 6",
"php": "PHP",
"pic": "Pic",
"pickle": "Pickle",
@ -508,6 +509,7 @@ var LanguagesByAlias = map[string]string{
"restructuredtext": "reStructuredText",
"rexx": "REXX",
"rhtml": "RHTML",
"ring": "Ring",
"rmarkdown": "RMarkdown",
"robotframework": "RobotFramework",
"roff": "Roff",

View File

@ -1,8 +1,8 @@
package enry
package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
// linguist's commit from which files were generated.
var linguistCommit = "b6460f8ed6b249281ada099ca28bd8f1230b8892"
var LinguistCommit = "d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68"

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
import (
"regexp"
@ -295,14 +295,14 @@ var ContentMatchers = map[string]languageMatcher{
} else if pl_Perl_Matcher_0.Match(i) {
return []string{"Perl"}
} else if pl_Perl6_Matcher_0.Match(i) {
return []string{"Perl6"}
return []string{"Perl 6"}
}
return nil
},
".pm": func(i []byte) []string {
if pm_Perl6_Matcher_0.Match(i) {
return []string{"Perl6"}
return []string{"Perl 6"}
} else if pm_Perl_Matcher_0.Match(i) {
return []string{"Perl"}
}
@ -405,7 +405,7 @@ var ContentMatchers = map[string]languageMatcher{
if t_Turing_Matcher_0.Match(i) {
return []string{"Turing"}
} else if t_Perl6_Matcher_0.Match(i) {
return []string{"Perl6"}
return []string{"Perl 6"}
} else if t_Perl_Matcher_0.Match(i) {
return []string{"Perl"}
}

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
import "gopkg.in/toqueteos/substring.v1"

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
var LanguagesByExtension = map[string][]string{
".1": {"Roff"},
@ -19,8 +19,8 @@ var LanguagesByExtension = map[string][]string{
".4th": {"Forth"},
".5": {"Roff"},
".6": {"Roff"},
".6pl": {"Perl6"},
".6pm": {"Perl6"},
".6pl": {"Perl 6"},
".6pm": {"Perl 6"},
".7": {"Roff"},
".8": {"Roff"},
".8xk": {"TI Program"},
@ -227,6 +227,7 @@ var LanguagesByExtension = map[string][]string{
".dylan": {"Dylan"},
".e": {"E", "Eiffel"},
".eam.fs": {"Formatted"},
".eb": {"Easybuild"},
".ebnf": {"EBNF"},
".ebuild": {"Gentoo Ebuild"},
".ec": {"eC"},
@ -557,7 +558,7 @@ var LanguagesByExtension = map[string][]string{
".nlogo": {"NetLogo"},
".no": {"Text"},
".nproj": {"XML"},
".nqp": {"Perl6"},
".nqp": {"Perl 6"},
".nr": {"Roff"},
".nse": {"Lua"},
".nsh": {"NSIS"},
@ -590,9 +591,9 @@ var LanguagesByExtension = map[string][]string{
".oz": {"Oz"},
".p": {"OpenEdge ABL"},
".p4": {"P4"},
".p6": {"Perl6"},
".p6l": {"Perl6"},
".p6m": {"Perl6"},
".p6": {"Perl 6"},
".p6l": {"Perl 6"},
".p6m": {"Perl 6"},
".pac": {"JavaScript"},
".pan": {"Pan"},
".parrot": {"Parrot"},
@ -626,8 +627,8 @@ var LanguagesByExtension = map[string][]string{
".pkgproj": {"XML"},
".pkl": {"Pickle"},
".pks": {"PLSQL"},
".pl": {"Perl", "Perl6", "Prolog"},
".pl6": {"Perl6"},
".pl": {"Perl", "Perl 6", "Prolog"},
".pl6": {"Perl 6"},
".plb": {"PLSQL"},
".plist": {"XML"},
".plot": {"Gnuplot"},
@ -636,8 +637,8 @@ var LanguagesByExtension = map[string][]string{
".plt": {"Gnuplot"},
".pluginspec": {"Ruby", "XML"},
".plx": {"Perl"},
".pm": {"Perl", "Perl6"},
".pm6": {"Perl6"},
".pm": {"Perl", "Perl 6"},
".pm6": {"Perl 6"},
".pmod": {"Pike"},
".po": {"Gettext Catalog"},
".pod": {"Perl", "Pod"},
@ -723,6 +724,7 @@ var LanguagesByExtension = map[string][]string{
".rexx": {"REXX"},
".rg": {"Rouge"},
".rhtml": {"RHTML"},
".ring": {"Ring"},
".rkt": {"Racket"},
".rktd": {"Racket"},
".rktl": {"Racket"},
@ -832,7 +834,7 @@ var LanguagesByExtension = map[string][]string{
".svh": {"SystemVerilog"},
".swift": {"Swift"},
".syntax": {"YAML"},
".t": {"Perl", "Perl6", "Terra", "Turing"},
".t": {"Perl", "Perl 6", "Terra", "Turing"},
".tab": {"SQL"},
".tac": {"Python"},
".targets": {"XML"},
@ -1104,6 +1106,7 @@ var ExtensionsByLanguage = map[string][]string{
"EJS": {".ejs"},
"EQ": {".eq"},
"Eagle": {".sch", ".brd"},
"Easybuild": {".eb"},
"Ecere Projects": {".epj"},
"Eiffel": {".e"},
"Elixir": {".ex", ".exs"},
@ -1295,7 +1298,7 @@ var ExtensionsByLanguage = map[string][]string{
"Pascal": {".pas", ".dfm", ".dpr", ".inc", ".lpr", ".pascal", ".pp"},
"Pep8": {".pep"},
"Perl": {".pl", ".al", ".cgi", ".fcgi", ".perl", ".ph", ".plx", ".pm", ".pod", ".psgi", ".t"},
"Perl6": {".6pl", ".6pm", ".nqp", ".p6", ".p6l", ".p6m", ".pl", ".pl6", ".pm", ".pm6", ".t"},
"Perl 6": {".6pl", ".6pm", ".nqp", ".p6", ".p6l", ".p6m", ".pl", ".pl6", ".pm", ".pm6", ".t"},
"Pic": {".pic", ".chem"},
"Pickle": {".pkl"},
"PicoLisp": {".l"},
@ -1341,6 +1344,7 @@ var ExtensionsByLanguage = map[string][]string{
"Regular Expression": {".regexp", ".regex"},
"Ren'Py": {".rpy"},
"RenderScript": {".rs", ".rsh"},
"Ring": {".ring"},
"RobotFramework": {".robot"},
"Roff": {".man", ".1", ".1in", ".1m", ".1x", ".2", ".3", ".3in", ".3m", ".3qt", ".3x", ".4", ".5", ".6", ".7", ".8", ".9", ".l", ".me", ".ms", ".n", ".nr", ".rno", ".roff", ".tmac"},
"Rouge": {".rg"},

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
var LanguagesByFilename = map[string][]string{
".Rprofile": {"R"},
@ -107,7 +107,7 @@ var LanguagesByFilename = map[string][]string{
"README.mysql": {"Text"},
"ROOT": {"Isabelle ROOT"},
"Rakefile": {"Ruby"},
"Rexfile": {"Perl6"},
"Rexfile": {"Perl 6"},
"SConscript": {"Python"},
"SConstruct": {"Python"},
"Settings.StyleCop": {"XML"},

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
var LanguagesByInterpreter = map[string][]string{
"Rscript": {"R"},
@ -60,7 +60,7 @@ var LanguagesByInterpreter = map[string][]string{
"osascript": {"AppleScript"},
"parrot": {"Parrot Assembly", "Parrot Internal Representation"},
"perl": {"Perl"},
"perl6": {"Perl6"},
"perl6": {"Perl 6"},
"php": {"PHP"},
"picolisp": {"PicoLisp"},
"pike": {"Pike"},

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
var LanguagesType = map[string]int{
"1C Enterprise": 2,
@ -107,6 +107,7 @@ var LanguagesType = map[string]int{
"EJS": 3,
"EQ": 2,
"Eagle": 3,
"Easybuild": 1,
"Ecere Projects": 1,
"Eiffel": 2,
"Elixir": 2,
@ -302,7 +303,7 @@ var LanguagesType = map[string]int{
"Pascal": 2,
"Pep8": 2,
"Perl": 2,
"Perl6": 2,
"Perl 6": 2,
"Pic": 3,
"Pickle": 1,
"PicoLisp": 2,
@ -349,6 +350,7 @@ var LanguagesType = map[string]int{
"Regular Expression": 1,
"Ren'Py": 2,
"RenderScript": 2,
"Ring": 2,
"RobotFramework": 2,
"Roff": 3,
"Rouge": 2,

View File

@ -2,7 +2,7 @@ package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// Extracted from github/linguist commit: d5c8db3fb91963c4b2762ca2ea2ff7cfac109f68
import "gopkg.in/toqueteos/substring.v1"
@ -35,6 +35,7 @@ var VendorMatchers = substring.Or(
substring.Regexp(`(^|/)font-awesome\.(css|less|scss|styl)$`),
substring.Regexp(`(^|/)foundation\.(css|less|scss|styl)$`),
substring.Regexp(`(^|/)normalize\.(css|less|scss|styl)$`),
substring.Regexp(`(^|/)skeleton\.(css|less|scss|styl)$`),
substring.Regexp(`(^|/)[Bb]ourbon/.*\.(css|less|scss|styl)$`),
substring.Regexp(`(^|/)animate\.(css|less|scss|styl)$`),
substring.Regexp(`third[-_]?party/`),

View File

@ -1,8 +1,8 @@
package enry
package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: {{ . }}
// linguist's commit from which files were generated.
var linguistCommit = "{{- . -}}"
var LinguistCommit = "{{- . -}}"

View File

@ -1,8 +1,8 @@
package enry
package data
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
// THIS FILE SHOULD NOT BE EDITED BY HAND
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
// linguist's commit from which files were generated.
var linguistCommit = "b6460f8ed6b249281ada099ca28bd8f1230b8892"
var LinguistCommit = "b6460f8ed6b249281ada099ca28bd8f1230b8892"

View File

@ -63,7 +63,7 @@ const (
frequenciesTmpl = "frequencies.go.tmpl"
// commit.go generation
commitFile = "commit.go"
commitFile = "data/commit.go"
commitTmplPath = "internal/code-generator/assets/commit.go.tmpl"
commitTmpl = "commit.go.tmpl"