File tree Expand file tree Collapse file tree 6 files changed +1330
-24
lines changed Expand file tree Collapse file tree 6 files changed +1330
-24
lines changed Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 strategy :
1111 matrix :
12- go : ['1.15', '1. 16', '1.17']
12+ go : ['1.16', '1.17']
1313
1414 name : Documentation and Linting
1515 steps :
3030 export PATH=$GOPATH/bin:$PATH
3131 cd go/src/github.com/opencontainers/image-spec
3232 make install.tools
33- go get -u github.com/alecthomas/gometalinter
34- gometalinter --install
3533 go get -t -d ./...
3634 ls ../
3735 make
Original file line number Diff line number Diff line change 1+ run :
2+ timeout : 10m
3+
4+ linters :
5+ disable-all : true
6+ enable :
7+ - deadcode
8+ - dupl
9+ - gofmt
10+ - goimports
11+ - gosimple
12+ - govet
13+ - ineffassign
14+ - misspell
15+ - nakedret
16+ - revive
17+ - structcheck
18+ - unused
19+ - varcheck
20+ - staticcheck
21+
22+ linters-settings :
23+ gofmt :
24+ simplify : true
25+ dupl :
26+ threshold : 400
Original file line number Diff line number Diff line change @@ -4,21 +4,4 @@ set -o errexit
44set -o nounset
55set -o pipefail
66
7- if [ ! $( command -v gometalinter) ]; then
8- go get -u github.com/alecthomas/gometalinter
9- gometalinter --install
10- fi
11-
12- for d in $( find . -type d -not -iwholename ' *.git*' -a -not -iname ' .tool' -a -not -iwholename ' *vendor*' ) ; do
13- gometalinter \
14- --exclude=' error return value not checked.*(Close|Log|Print).*\(errcheck\)$' \
15- --exclude=' .*_test\.go:.*error return value not checked.*\(errcheck\)$' \
16- --exclude=' duplicate of.*_test.go.*\(dupl\)$' \
17- --exclude=' schema/fs.go' \
18- --disable=aligncheck \
19- --disable=gotype \
20- --disable=gas \
21- --cyclo-over=35 \
22- --tests \
23- --deadline=60s " ${d} "
24- done
7+ GO111MODULE=on golangci-lint run
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ check-license:
9292 @echo " checking license headers"
9393 @./.tool/check-license
9494
95- lint :
95+ lint : .install.lint
9696 @echo " checking lint"
9797 @./.tool/lint
9898
@@ -114,6 +114,9 @@ endif
114114
115115install.tools : $(TOOLS:%=.install.% )
116116
117+ .install.lint :
118+ go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest
119+
117120.install.esc :
118121 go get -u github.com/mjibson/esc
119122
Original file line number Diff line number Diff line change @@ -3,9 +3,16 @@ module github.com/opencontainers/image-spec
33go 1.11
44
55require (
6+ github.com/davecgh/go-spew v1.1.1 // indirect
7+ github.com/golangci/golangci-lint v1.43.0 // indirect
8+ github.com/kr/text v0.2.0 // indirect
9+ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
610 github.com/opencontainers/go-digest v1.0.0
711 github.com/pkg/errors v0.9.1
812 github.com/russross/blackfriday v1.6.0
13+ github.com/stretchr/testify v1.7.0 // indirect
914 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
1015 github.com/xeipuuv/gojsonschema v1.2.0
16+ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
17+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
1118)
You can’t perform that action at this time.
0 commit comments