Skip to content

Commit 6d1a7a4

Browse files
committed
Add scala source detector
1 parent af7b706 commit 6d1a7a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/generate/source/detector.go

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var DefaultDetectors = Detectors{
2727
DetectPHP,
2828
DetectPython,
2929
DetectPerl,
30+
DetectScala,
3031
}
3132

3233
type sourceDetector struct {
@@ -74,6 +75,11 @@ func DetectPerl(dir string) (*Info, bool) {
7475
return detect("perl", dir, "index.pl", "cpanfile")
7576
}
7677

78+
// DetectScala detects Scala source
79+
func DetectScala(dir string) (*Info, bool) {
80+
return detect("scala", dir, "build.sbt")
81+
}
82+
7783
// detect returns an Info object with the given platform if the source at dir contains any of the argument files
7884
func detect(platform string, dir string, files ...string) (*Info, bool) {
7985
if filesPresent(dir, files) {

0 commit comments

Comments
 (0)