git.iko.soy/typeable/oauth2-proxy
on master help sign in
Switch linter to golangci-lint
411adf6Henry Jenkins
.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:
6 - wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
6 - wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
7 - chmod +x dep
7 - chmod +x dep
8 - mv dep $GOPATH/bin/dep
8 - mv dep $GOPATH/bin/dep
9− - go get github.com/alecthomas/gometalinter
9+ - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.17.1
10− - gometalinter --install
11script:
10script:
12 - ./configure && make test
11 - ./configure && make test
13sudo: false
12sudo: false
CHANGELOG.md+1
@@ -62,6 +62,7 @@
62- [#185](https://github.com/pusher/oauth2_proxy/pull/185) Fix an unsupported protocol scheme error during token validation when using the Azure provider (@jonas)
62- [#185](https://github.com/pusher/oauth2_proxy/pull/185) Fix an unsupported protocol scheme error during token validation when using the Azure provider (@jonas)
63- [#141](https://github.com/pusher/oauth2_proxy/pull/141) Check google group membership based on email address (@bchess)
63- [#141](https://github.com/pusher/oauth2_proxy/pull/141) Check google group membership based on email address (@bchess)
64 - Google Group membership is additionally checked via email address, allowing users outside a GSuite domain to be authorized.
64 - 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
65
66
66# v3.2.0
67# v3.2.0
67
68
Dockerfile+1
@@ -3,6 +3,7 @@ FROM golang:1.12-stretch AS builder
3# Download tools
3# Download tools
4RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
4RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
5RUN chmod +x $GOPATH/bin/dep
5RUN 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
6
7
7# Copy sources
8# Copy sources
8WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
9WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
Dockerfile.arm64+1
@@ -3,6 +3,7 @@ FROM golang:1.12-stretch AS builder
3# Download tools
3# Download tools
4RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
4RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
5RUN chmod +x $GOPATH/bin/dep
5RUN 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
6
7
7# Copy sources
8# Copy sources
8WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
9WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
Dockerfile.armv6+1
@@ -3,6 +3,7 @@ FROM golang:1.12-stretch AS builder
3# Download tools
3# Download tools
4RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
4RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
5RUN chmod +x $GOPATH/bin/dep
5RUN 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
6
7
7# Copy sources
8# Copy sources
8WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
9WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
Makefile+1−11
@@ -17,17 +17,7 @@ distclean: clean
17
17
18.PHONY: lint
18.PHONY: lint
19lint:
19lint:
20− $(GOMETALINTER) --vendor --disable-all \
20+ $(GOLANGCILINT) run
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 ./...
31
21
32.PHONY: dep
22.PHONY: dep
33dep:
23dep:
configure+2−2
@@ -126,7 +126,7 @@ check_for go
126check_go_version
126check_go_version
127check_go_env
127check_go_env
128check_for dep
128check_for dep
129−check_for gometalinter
129+check_for golangci-lint
130
130
131echo
131echo
132
132
@@ -135,7 +135,7 @@ cat <<- EOF > .env
135 GO := "${tools[go]}"
135 GO := "${tools[go]}"
136 GO_VERSION := ${tools[go_version]}
136 GO_VERSION := ${tools[go_version]}
137 DEP := "${tools[dep]}"
137 DEP := "${tools[dep]}"
138− GOMETALINTER := "${tools[gometalinter]}"
138+ GOLANGCILINT := "${tools[golangci-lint]}"
139EOF
139EOF
140
140
141echo "Environment configuration written to .env"
141echo "Environment configuration written to .env"