|
|
@ -26,9 +26,17 @@ type Detector struct {
|
|
26
|
26
|
|
|
27
|
27
|
var Detectors = []Detector{
|
|
28
|
28
|
{Detection{"clojure", "leiningen"}, clojureLeiningen},
|
|
|
29
|
{Detection{"docker", "fig"}, dockerFig},
|
|
|
30
|
{Detection{"docker", "default"}, dockerDefault},
|
|
|
31
|
{Detection{"executable", "default"}, executableDefault},
|
|
29
|
32
|
{Detection{"go", "default"}, goDefault},
|
|
30
|
33
|
{Detection{"java", "maven"}, javaMaven},
|
|
|
34
|
{Detection{"javascript", "npm"}, javascriptNpm},
|
|
|
35
|
{Detection{"javascript", "meteor"}, javascriptMeteor},
|
|
|
36
|
{Detection{"javascript", "default"}, javascriptDefault},
|
|
31
|
37
|
{Detection{"make", "default"}, makeDefault},
|
|
|
38
|
{Detection{"procfile", "default"}, procfileDefault},
|
|
|
39
|
{Detection{"python", "django"}, pythonDjango},
|
|
32
|
40
|
{Detection{"python", "default"}, pythonDefault},
|
|
33
|
41
|
{Detection{"ruby", "rails"}, rubyRails},
|
|
34
|
42
|
{Detection{"ruby", "rake"}, rubyRake},
|
|
|
@ -66,6 +74,18 @@ func clojureLeiningen(file string) bool {
|
|
66
|
74
|
return hasFile(file, "project.clj")
|
|
67
|
75
|
}
|
|
68
|
76
|
|
|
|
77
|
func dockerFig(file string) bool {
|
|
|
78
|
return hasFile(file, "fig.yml")
|
|
|
79
|
}
|
|
|
80
|
|
|
|
81
|
func dockerDefault(file string) bool {
|
|
|
82
|
return hasFile(file, "Dockerfile")
|
|
|
83
|
}
|
|
|
84
|
|
|
|
85
|
func executableDefault(file string) bool {
|
|
|
86
|
return fileutil.IsExecutable(file)
|
|
|
87
|
}
|
|
|
88
|
|
|
69
|
89
|
func goDefault(file string) bool {
|
|
70
|
90
|
return matchingFileOrDir(file, "*.go")
|
|
71
|
91
|
}
|
|
|
@ -74,10 +94,30 @@ func javaMaven(file string) bool {
|
|
74
|
94
|
return hasFile(file, "pom.xml")
|
|
75
|
95
|
}
|
|
76
|
96
|
|
|
|
97
|
func javascriptNpm(file string) bool {
|
|
|
98
|
return hasFile(file, "package.json")
|
|
|
99
|
}
|
|
|
100
|
|
|
|
101
|
func javascriptMeteor(file string) bool {
|
|
|
102
|
return hasFile(file, ".meteor/.id")
|
|
|
103
|
}
|
|
|
104
|
|
|
|
105
|
func javascriptDefault(file string) bool {
|
|
|
106
|
return matchingFileOrDir(file, "*.js")
|
|
|
107
|
}
|
|
|
108
|
|
|
77
|
109
|
func makeDefault(file string) bool {
|
|
78
|
110
|
return hasFile(file, "Makefile")
|
|
79
|
111
|
}
|
|
80
|
112
|
|
|
|
113
|
func procfileDefault(file string) bool {
|
|
|
114
|
return hasFile(file, "Procfile")
|
|
|
115
|
}
|
|
|
116
|
|
|
|
117
|
func pythonDjango(file string) bool {
|
|
|
118
|
return hasFile(file, "manage.py")
|
|
|
119
|
}
|
|
|
120
|
|
|
81
|
121
|
func pythonDefault(file string) bool {
|
|
82
|
122
|
return matchingFileOrDir(file, "*.py")
|
|
83
|
123
|
}
|