Skip to content

Commit

Permalink
Integrate haskell dependency parser
Browse files Browse the repository at this point in the history
  • Loading branch information
dron22 committed Dec 29, 2020
1 parent 94c514d commit 5d6dd1e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/deps/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ func Detect(filepath string, language heartbeat.Language) ([]string, error) {
parser = &ParserElm{}
case heartbeat.LanguageGo:
parser = &ParserGo{}
case heartbeat.LanguageHaskell:
parser = &ParserHaskell{}
case heartbeat.LanguageHaxe:
parser = &ParserHaxe{}
case heartbeat.LanguageJava:
Expand Down
5 changes: 5 additions & 0 deletions pkg/deps/deps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ func TestDetect(t *testing.T) {
"github.com/wakatime/wakatime-cli/pkg/heartbeat",
},
},
"haskell": {
Filepath: "testdata/haskell_minimal.hs",
Language: heartbeat.LanguageHaskell,
Dependencies: []string{"Control"},
},
"haxe": {
Filepath: "testdata/haxe_minimal.hx",
Language: heartbeat.LanguageHaxe,
Expand Down
3 changes: 3 additions & 0 deletions pkg/deps/testdata/haskell_minimal.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Control.Concurrent (forkIO, threadDelay)

main = putStrLn "hello world"

0 comments on commit 5d6dd1e

Please sign in to comment.