@@ -7,7 +7,6 @@ $(info builddir ${builddir})
7
7
${builddir} :
8
8
mkdir -p $(builddir )
9
9
10
- .PHONY : bins
11
10
bins : install_ci
12
11
go build -o ${builddir} /arachned github.com/uber/arachne/arachned/
13
12
@@ -16,35 +15,28 @@ all: bins
16
15
clean :
17
16
rm -f ${builddir} /*
18
17
19
-
20
- .PHONY : lint
18
+ FILTER := grep -v -e '_string.go' -e '/gen-go/' -e '/mocks/' -e 'vendor/'
21
19
lint :
22
- go vet $(PACKAGES )
23
-
24
- .PHONY : test
25
- test : check-license lint install_ci
20
+ @echo " Running golint"
21
+ -golint $(ALL_PKGS ) | $(FILTER ) | tee lint.log
22
+ @echo " Running go vet"
23
+ -go vet $(ALL_PKGS ) 2>&1 | fgrep -v -e " possible formatting directiv" -e " exit status" | tee -a lint.log
24
+ @echo " Verifying files are gofmt'd"
25
+ -gofmt -l . | $(FILTER ) | tee -a lint.log
26
+ @echo " Checking for unresolved FIXMEs"
27
+ -git grep -i -n fixme | $(FILTER ) | grep -v -e Makefile | tee -a lint.log
28
+ @[ ! -s lint.log ]
29
+
30
+ test : lint install_ci
26
31
find . -type f -name ' *.go' | xargs golint
27
32
go test $(PACKAGES )
28
33
29
- .PHONY : vendor
30
34
vendor : glide.lock
31
35
glide install
32
36
33
- .PHONY : install_ci
34
37
install_ci :
35
38
glide --version || go get -u -f github.com/Masterminds/glide
36
39
make vendor
37
- go get -u -f github.com/golang/lint/golint
38
-
39
- vendor/github.com/uber/uber-licence : vendor
40
- [ -d vendor/github.com/uber/uber-licence ] || glide install
41
-
42
- vendor/github.com/uber/uber-licence/node_modules : vendor/github.com/uber/uber-licence
43
- cd vendor/github.com/uber/uber-licence && npm install
44
-
45
- .PHONY : check-license add-license
46
- check-license : vendor/github.com/uber/uber-licence/node_modules
47
- ./vendor/github.com/uber/uber-licence/bin/licence --dry --file ' *.go'
40
+ go get -u golang.org/x/lint/golint
48
41
49
- add-license : vendor/github.com/uber/uber-licence/node_modules
50
- ./vendor/github.com/uber/uber-licence/bin/licence --verbose --file ' *.go'
42
+ .PHONY : bins test vendor install_ci lint
0 commit comments