Skip to content

Commit ede362b

Browse files
committed
vendor: add bblfsh client as dependency
Signed-off-by: Miguel Molina <[email protected]>
1 parent 9cd6912 commit ede362b

File tree

759 files changed

+515423
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

759 files changed

+515423
-10
lines changed

.travis.yml

+25
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,43 @@
11
language: go
2+
sudo: required
23

34
go:
45
- 1.9
56
- tip
67

8+
<<<<<<< HEAD
79
go_import_path: github.com/src-d/gitbase
10+
=======
11+
services:
12+
- docker
13+
14+
go_import_path: github.com/src-d/gitbase
15+
>>>>>>> internal/function: implement uast and uast_xpath functions
816

917
matrix:
1018
fast_finish: true
1119
allow_failures:
1220
- go: tip
1321

22+
addons:
23+
apt:
24+
sources:
25+
- ubuntu-toolchain-r-test
26+
packages:
27+
- gcc-6
28+
- g++-6
29+
1430
install:
31+
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
32+
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
33+
- cd ./vendor/gopkg.in/bblfsh/client-go.v2
1534
- make dependencies
35+
- cd ./../../../..
36+
- make dependencies
37+
38+
before_script:
39+
- docker run -d --name bblfshd --privileged -p 9432:9432 -v /var/lib/bblfshd:/var/lib/bblfshd bblfsh/bblfshd
40+
- docker exec -it bblfshd bblfshctl driver install --all
1641

1742
script:
1843
- make test-coverage codecov

Gopkg.lock

+73-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+4
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@
4545
[[constraint]]
4646
name = "gopkg.in/src-d/enry.v1"
4747
version = "1.6.3"
48+
49+
[[constraint]]
50+
name = "gopkg.in/bblfsh/client-go.v2"
51+
version = "2.4.1"

env.go

+8
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ func getBoolEnv(key string, defaultValue bool) bool {
2525

2626
return defaultValue
2727
}
28+
29+
func getStringEnv(key string, defaultValue string) string {
30+
v, ok := os.LookupEnv(key)
31+
if !ok {
32+
return defaultValue
33+
}
34+
return v
35+
}

internal/function/registry.go

+3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ package function
22

33
import "gopkg.in/src-d/go-mysql-server.v0/sql"
44

5+
// Functions for gitbase queries.
56
var Functions = sql.Functions{
67
"is_tag": sql.Function1(NewIsTag),
78
"is_remote": sql.Function1(NewIsRemote),
89
"commit_has_blob": sql.Function2(NewCommitHasBlob),
910
"history_idx": sql.Function2(NewHistoryIdx),
1011
"commit_has_tree": sql.Function2(NewCommitHasTree),
1112
"language": sql.FunctionN(NewLanguage),
13+
"uast": sql.FunctionN(NewUAST),
14+
"uast_xpath": sql.Function2(NewUASTXPath),
1215
}

0 commit comments

Comments
 (0)