git.iko.soy/typeable/oauth2-proxy
on master help sign in
Switch linter to golangci-lint
commit411adf6f21ac6de81a2ade696b53b8d4d012f6a4 authorHenry Jenkins <henry@henryjenkins.name> dateSun 23 Jun 2019, 20:40 (7 years ago) parent317f09f
8 files changed+22−15
.golangci.yml+14 .travis.yml+1−2 CHANGELOG.md+1 Dockerfile+1 Dockerfile.arm64+1 Dockerfile.armv6+1 Makefile+1−11 configure+2−2
.golangci.ymlnew file+14
@@ -0,0 +1,14 @@
1+run:
2+ deadline: 120s
3+linters:
4+ enable:
5+ - govet
6+ # TODO: Not supported by golang-ci - vetshadow
7+ - golint
8+ - ineffassign
9+ - goconst
10+ - deadcode
11+ - gofmt
12+ - goimports
13+ enable-all: false
14+ disable-all: true
.travis.yml+1−2
@@ -6,8 +6,7 @@ install:
66 - wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
77 - chmod +x dep
88 - mv dep $GOPATH/bin/dep
9− - go get github.com/alecthomas/gometalinter
10− - gometalinter --install
9+ - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.17.1
1110script:
1211 - ./configure && make test
1312sudo: false
CHANGELOG.md+1
@@ -62,6 +62,7 @@
6262- [#185](https://github.com/pusher/oauth2_proxy/pull/185) Fix an unsupported protocol scheme error during token validation when using the Azure provider (@jonas)
6363- [#141](https://github.com/pusher/oauth2_proxy/pull/141) Check google group membership based on email address (@bchess)
6464 - Google Group membership is additionally checked via email address, allowing users outside a GSuite domain to be authorized.
65+- [#XX](https://github.com/pusher/outh2_proxy/pull/XX) Switch from gometalinter to golangci-lint
6566
6667# v3.2.0
6768
Dockerfile+1
@@ -3,6 +3,7 @@ FROM golang:1.12-stretch AS builder
33# Download tools
44RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
55RUN chmod +x $GOPATH/bin/dep
6+RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
67
78# Copy sources
89WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
Dockerfile.arm64+1
@@ -3,6 +3,7 @@ FROM golang:1.12-stretch AS builder
33# Download tools
44RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
55RUN chmod +x $GOPATH/bin/dep
6+RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
67
78# Copy sources
89WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
Dockerfile.armv6+1
@@ -3,6 +3,7 @@ FROM golang:1.12-stretch AS builder
33# Download tools
44RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
55RUN chmod +x $GOPATH/bin/dep
6+RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
67
78# Copy sources
89WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
Makefile+1−11
@@ -17,17 +17,7 @@ distclean: clean
1717
1818.PHONY: lint
1919lint:
20− $(GOMETALINTER) --vendor --disable-all \
21− --enable=vet \
22− --enable=vetshadow \
23− --enable=golint \
24− --enable=ineffassign \
25− --enable=goconst \
26− --enable=deadcode \
27− --enable=gofmt \
28− --enable=goimports \
29− --deadline=120s \
30− --tests ./...
20+ $(GOLANGCILINT) run
3121
3222.PHONY: dep
3323dep:
configure+2−2
@@ -126,7 +126,7 @@ check_for go
126126check_go_version
127127check_go_env
128128check_for dep
129−check_for gometalinter
129+check_for golangci-lint
130130
131131echo
132132
@@ -135,7 +135,7 @@ cat <<- EOF > .env
135135 GO := "${tools[go]}"
136136 GO_VERSION := ${tools[go_version]}
137137 DEP := "${tools[dep]}"
138− GOMETALINTER := "${tools[gometalinter]}"
138+ GOLANGCILINT := "${tools[golangci-lint]}"
139139EOF
140140
141141echo "Environment configuration written to .env"