forked from koding/koding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_socialapi_code_quality.sh
More file actions
executable file
·43 lines (37 loc) · 1.24 KB
/
Copy pathcheck_socialapi_code_quality.sh
File metadata and controls
executable file
·43 lines (37 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# make relative paths work.
cd $(dirname $0)/..
v=$(git diff-tree -r --name-only --no-commit-id master `git rev-parse HEAD` ./go/src/socialapi 2>&1)
if [ -z "$v" ]; then
echo "nothing has changed under ./go/src/socialapi"
exit 0
fi
echo "checking cyclo complexity (disabled due to go1.6 switch - fixme!)"
# Due to go1.6 gocyclo check started suddently to work showing
# a number of complex functions:
#
# https://app.wercker.com/#buildstep/5794af80d5df0401007a95dda
#
# Please fix the code and lower the value back to 20.
#
# ./go/bin/gocyclo -top 28 ./go/src/socialapi/*/**/**.go
echo "checking deadcode (disabled due to go1.6 switch - fixme!)"
# Due to go1.6 deadcode check suddenly started to work showing
# a number of dead functions in socialapi:
#
# https://app.wercker.com/#buildstep/5794af80d5df0401007a95dd
#
# Please fix code and enable this check.
#
# ./scripts/deadcode.sh
echo "checking go vet (TODO: enable or remove me!)"
# ./scripts/govet.sh
# Due to go1.6 unsused variable check suddenly started to work showing
# a number of unused variables in socialapi:
#
# https://app.wercker.com/#buildstep/5794af80d5df0401007a95dd
#
# Please fix code and enable this check.
#
echo "checking unused variables"
# ./scripts/govarcheck.sh